Tag Archives: blogging

Posting Code

So here we are

sed -i '1/,/^$/ s/this/that/g'

Well that worked out!  Now can I color it?

sed -i '1/,/^$/ s/this/that/g'

Apparently I can. One must edit the post in HTML mode and color everything by hand, which is a pain in the rear. Now I wonder if there’s a WordPress tool that will auto-color code snippets based on the language.

Update January 7, 2012:
I learned from a friend that there exists a plugin to automatically color the code samples. He showed me how it works, and now I will try it a different way. Basically, he used the <pre> tags with a class declaration to turn on the syntax highlighting. I will try it here with the <code> tags:

ls -l /etc/sysconfig/network-scripts/ | grep ifcfg

Did it work? No.

Now I’ll display the same thing with the <pre> tags:

1
ls -l /etc/sysconfig/network-scripts/ | grep ifcfg

The plugin is called WP-Syntax and it looks pretty cool. You can do the same thing without line numbers too:

ls -l /etc/sysconfig/network-scripts/ | grep ifcfg

And now a multi-line Bash script that performs a simple yum update and reboots the machine if there was a kernel update (no logic, YMMV):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
 
##*****************************************************************************
## TITLE:                   YUM Update with Kernel Reboot
## FILENAME:                yum.sh
## RELATED FILE(S)          /tmp/yum.catch
## PREPARED FOR:            Green Light IT Consulting
## PROGRAMMER(S):           Benjamin Rehberg
## DEVELOPMENT DATE:        11/22/2011
## COMPILER USED:           None (shell interpreter)
## TARGET PLATFORM:         Interpreted by UNIX/Linux POSIX-compliant
##=============================================================================
##                            REVISION HISTORY
##      DATE            PROGRAMMER      DESCRIPTION OF CHANGES MADE
##      11/22/2011      Ben Rehberg     Initial conception and testing
##
##*****************************************************************************
##             CLASSES, FREE, AND FRIEND FUNCTIONS IMPLEMENTED
##
##      Not OO; procedual script
##
##*****************************************************************************
##                               CONSTANTS
##*****************************************************************************
##                  STANDARD AND USER DEFINED INCLUDES
##*****************************************************************************
##             Definition of member functions for class MyUtilities
##*****************************************************************************
##                          DESCRIPTION/PURPOSE
##
## This script will run yum -y update to update the server software.  It will
## then look in the output for any update in the current iteration that was
## related to the kernel, and reboot the server if it found one.  This is
## designed to run weekly and only on servers that can tolerate an unattended
## reboot.
 
date=`date +'%b %d %H:%M:%S'`
log="/var/log/messages"
 
yum -y update --skip-broken | tee /tmp/yum.catch
 
if [ `grep kernel /tmp/yum.catch | wc -l` -gt 0 ]
then
        echo "$date YUM script run and the kernel was updated.  Rebooting..." >> $log
        reboot
else
        echo "$date YUM script run and the kernel was not updated." >> $log
fi

The State of My Blog Address

I just took the survey that Technorati created to get some data about the blogosphere for 2011.  While I didn’t get any of the information yet (results are due out in November), I came to realize something: I am not a blogger.

Given that I don’t really have a passion for much to the extent that I need to write about it, there definitely isn’t a pattern of dedicated use here on my blog.  I’ve said many times that I’d like to change that, but whenever I tell my readers I’m going to post more regularly it always follows that I do not do that.

So here’s the state of my blogosphere: dismal.  I’d say I’m way too  busy to write, but that’s not the case.  I have plenty of time to do the things I need to do – I just don’t have the interest.  I just began to wonder how many blog posts I’ve made that reference my apathy about this site.

Anyways, I’ll write it again: I would love to write daily here and frequently discuss things that peak my interest, but blogging here doesn’t come to mind in my daily routine.  That could be due to my lack of any routine these days – I work in a city away from my family on the night shift, and the weekends are hectic with travel and housework.  Switching from nights to days every weekend wreaks havoc on the mind so that it isn’t productive at all.  And that’s just one reason.

Another detriment to my postings is the state of my mind when I finally do sit down to write.  There’s not just one thing on my plate – from the beginning of this post up to this point, I’ve vacuumed the carpet and also called the doctor’s office.  And I can’t be still.

And I just read an article at WebMD about ADHD.  I think I might have something close to it.  I won’t know for some time, though, because my doctor can’t see me as a new patient because it’s Friday.  And I’m not in town any other day.

What was I talking about?

Oh – this blog and why I don’t post often.  That’s right…

Greetings from iPad

Posting here with iPad. Really don’t want to go back to Atlanta today; I’m having a great time with my wife and children. Not much else to write – it’s much easier to type here than on the phone. I hope the Android tablet I get will be even easier to use.

Toodles!

Hello world!

I’ve just migrated the blogger blog to WordPress, and it was surprisingly easy.  I now have more control over my blog, the hosting, and everything.  Now I have an ongoing project – I’m hosting this in the apartment in Atlanta and will manage backups, server migrations, outages, and all that stuff.

Freedom!  I’ll keep discussing this as we go along.

Blogging from the Kindle

I honestly didn’t think it would work, but the browser in the Kindle is more equipped than i had thought. This is a real pain, but I can actually compose and publish a post from the web interface of Kindle’s experimental browser.

On Whatever, or One Post Per Day (No Commitment)

I really miss being able to concentrate.  If the reader might notice, most of the posts in the last four years are very short.  A thought comes to mind to quit using computers during my time off so that I may gather my thoughts more efficiently and perhaps provide the reader with more entertaining fodder.

But giving up the use of computers at any time is very difficult for me.  I could easily give up my phone as it does nothing but sit on my hip.  No one calls, and I could talk to my wife through the computer with better results at times than the telephone.  My life permanently on the other side of a computer screen is nearly unimaginable.

Being an amateur software designer/developer and a professional systems administrator, it is very hard to put thoughts of “what if…” out of my mind.  I read about systems and rebuild things almost every day.  It takes that to be better at what I do with every iteration at work.  I rarely think of much else, and wouldn’t have anything to write of if I didn’t do what I do.

I find myself lately writing about not writing.  It’s a good exercise to sit down and just write, as many writing classes always begin.  No matter if you think you don’t have anything to write – just write: “I don’t have anything to write.”  Then elaborate.  It starts just like that.

Sometime I may begin to try posting at least once every day here on the blog and see what comes of it.  Every day for, say, a week, and if it’s working out I’ll keep it for a month.  We should see how that goes.  I’ll tag them with OPPD, for One Post Per Day.  If I can post at least something genuine once per day for a week I will claim to have accomplished something.

Okay, the rules.

I’m a design and planning freak.  I like to know how it could be done, and the likelihood of outcomes with each scenario.  I picture things in my head a lot before I do something.  So if I’m going to make the attempt at posting every day, I need to furnish at least the semblance1 of a plan.  Here are some thoughts: I will likely make posts from my laptop in Atlanta, and they may be about the day, news events, or (the most likely case) simply start with “There’s nothing to write about today….”  I will make reminder items on my calendar that will tell me to write.  There is no topic I can’t write about – an instructional post on system administration is perfectly acceptable, as is a post about the royal wedding (probably the least likely to come to my attention).

I could make notes about something with my phone.  Pictures from the day’s events could draw more words out of me for the posts.  I like taking pictures.  I need to ride my bike or run more, so getting out to grab pictures and thoughts is probably a good way to seed blog posts.

I see that this hasn’t actually been a bulleted set of rules, and that’s good.  My life must be flexible, and I want it known that I haven’t committed to this yet.  There is no start date specified.  I remember committing to reading every non-reference book in my library in 2005.  That got nowhere.  I read one book, and I can’t remember much at all about The Time Machine because I read it so fast.  It really didn’t count as reading.

But I do want to write more and write better.  I want to try the one-post-per-day event.  I suppose the first post tagged with “OPPD” will signify my commitment. We’ll see how long my interest lasts.

Notes:
1. I just realized that I have never before typed the word ‘semblance’ but have only used it in speech.  I happened to get the spelling and the use of the word correct.

Random Thinking

I’ve just come to the conclusion, at 12:48 this morning, that I don’t write here much anymore because I really don’t care enough to do so.  I am not that passionate about anything anymore to the point that I feel I should write about it.

Apparently I’m passionate enough about not being passionate, though.  I’ve just told you in a couple of sentences that I don’t care about anything enough to write a public discussion.  And look – you’re already growing bored of this post.  The fact is that I have had this blog here at benrehberg.com for over six years now and I have only posted 520 times.  I’ve nearly tweeted that much in 18 months.  And speaking of Twitter, I think I’m getting off of that train.  Facebook too.  Down with friends who only know me again through a social experiment and marketing shithole.  And fuck Mark Zuckerberg.

And lately, fuck Google too, and their sleazy one-night-stand Verizon.  I’m beginning to dislike those companies simply because they profit too much on the personal interactions of individuals.  It’s a sickness that wears one out from the outside in.  First it was search results which were innocent enough. It has come all the way to “push” advertising, where Google will know that since I like pizza and I am near a pizza restaurant, my phone will buzz to tell me the specials there (near future).

No thanks.  I’m quitting Facebook, and I am seriously considering not continuing with Google and Android.  I do not live where that plethora of information is usable, and I am becoming increasingly afraid that we will become too dependent on this availability of data and personalization.  Like GPS has done for travelers – we no longer have maps or ask for directions.

I realize that I am rambling.  It’s late and I have been drinking to counteract the early-afternoon coffee that punishes me when I close my eyes tonight.

I’m Back.

So there’s another way to publish to Blogger, and I guess I’ll keep it.  I had to switch a few things (actually WAY more than a few), but I have a whole lot more time to get things worked out.  Stay tuned.

The blog feed is now http://feeds.feedburner.com/BenRehberg if you’re interested in subscribing.
              

Redesign #13 or so…

As the world constantly changes, so does my mind. I wanted a simple layout for this blog, but still couldn’t fit all the details in to this slight redesign. Still, it was a welcome change. Not much change, mind you, but settling on a largely black-and-white theme pleased me. Things might get simpler still. If you don’t bother noting the post time here, I’ll tell you anyway: I’m off to bed as I have nothing more to say at this hour.

Another Break

Wow. It’s been a long time since April 14. It’s June 6 already. Let me catch you up:

I graduated college on May 12. We had a little party on the 16th. As of today I have not received my diploma.

My son was born five days ago, on June 1st. I kept those in-the-know updated via Twitter from my iPod over WiFi at the hospital. Say what you want.

Braden Michael Rehberg was born at 07:53 EST on June 1, 2009. 8lb, 9oz and 21″ long.

Having written that, I now realize that this blog is five years old. I know this because I started writing here way before my daughter was born. I announced her birth somewhere back there in the archives, too. Is this turning into a career?

In between graduating and Braden’s arrival, my business blew up and I was busier than I had ever been. It’s still going and I am glad I took this entire month off from work. Maybe I can catch up. I’m loving it so far.

As much as I hated doing all that schoolwork and having sworn it off, I caught myself at school with Beth today thumbing through the 2008-2009 Graduate catalog. They still don’t have any interesting Masters programs. I have changed my direction a bit away from IT, but it’s still a close relation: Project Management. The PM courses I had in my undergrad were interesting, and there’s quite a bit of science to the art that is Project Management. A lot of projects today are technical ones anyway, so it won’t hurt to have a background in computers and networks. Having decided that, I have not come to a conclusion as to whether a graduate degree would help me any more after I become a PMP.

More on that later. I hope to have some kind of theme to write about here, but my brain is certainly too full and prone to wander. Don’t believe me? Check the archives.

Late-