Month: October 2013

The accomplishment for the week (Tech!)

So where I work – instead of doing standard mysqldump SQL dumps – they copy the INNODB files into a backup. These backups an be  6GB or more per week. So it was killing the VM the MySQL server runs on.

Now my predecessor had started writing a prune-mysql-backups.sh script. All he’d done was do a list files (ls -At) in time order and then create a text file called filelist.

But the thing was, the dated files went in ascending order. I didn’t want them that way. And apparently he didn’t know enough about sort and sed to complete the script. Sort or sort does exactly what it says, sorts a list of items. The term sed means Stream Editor.

So I had to fire sort -r which means in reverse chronological order then I ran sed to strip out the three newer items in the list, and then pass that file in to a section that walked through the list and rm -rf’d the directories.

That last part ‘rm -rf’ is a goodie. In Unix parlance rm means REMOVE and the -r means recursive the f being all files. You never, ever, ever want to do this on the root partition which would be ‘rm -rf /’. A fast and hard rule to live by is something has to live in FRONT of the slash, e.g. ‘rm -rf 2013-09-30_21-00-34/ ‘would be ok since it’s going to try to walk in that directory and then delete the content and directory.

Another trick is to alias rm -rf and have it make a confirmation of “Do you really want to do this?” before proceeding. That’s the power of Unix/Linux. You can write scripts and aliases to do pretty much anything.

The Event of the Week at Work

Happened around lunchtime on Friday.

First one of the platforms we use crashed HARD, requiring a cold reboot of the system that housed a whole lot of virtual machines. And of course my inbox was filled up with about 500 new messages alerting us to the fact.

But the other one was more intriguing – it was on the Linux based side. A provisioning script kept crashing at line 120 when it tried to launch Apache Ant. It would do a test and just puke and exit the script at that point. I said, and it was my first inlking – it was like Ant wasn’t in the path for the user we were running the script as at that point. Now we had to sudo su – in to do this and then change to another user using su – {username} which spawns a login session. But the PATH variable wasn’t being set with the Ant info.

So then I did the following looking for terms like “PATH”, etc. by popping up to the home directory and issuing the command

cat */.bash_history |grep PATH|su|sudo

What that does is goes through every user directory in the /home top level and search through every .bash_history file for those terms.

But oddly nothing turned up. I suspect someone made a change to the path on this system – but no evidence of it so it looks like someone edited their .bash_history. Which lead me to suggest something. Why not scrape the .bash_history files every minute looking for those terms and then log it into a database. Pretty easy to write the script to do this and just schedule a cron job to kick it off once every minute or two. So next time someone does something stupid – it’ll get caught and committed to a database.

The other thing I recommended is doing the following every now and then:

date >> ~/.bash_history

Which puts a time and date stamp into the .bash_history file. That way you can see WHEN something happened.

 

So a client doesn’t want to pay and wants to change the game

I sent a reply to him that at this point I’ve gone round and round, that to implement the current round of changes would require 30+ hours and that I haven’t been compensated for WORK ALREADY DONE. In my message I demanded payment and said if none were forthcoming I would refer the matter to my attorney.

I wonder what the response to that will be.

Sunday Stealing Again!

Yet another one from Rejected Reality who stole it from elsehwere. Haven’t done one in a while:

  1. What was your first alcoholic drink? – My grandfather used to slip me sips of Narragansett Beer. Which probably explains my love of brown ales now.
  2. What was your first job? – A clerk at NHD – a hardware store.
  3. What was your first car? – 1976 Pontiac Trans-Am with a 455 and a four speed. Only difference between the one pictured and the one I had was mine had the T-Top on it.

    1976 Pontiac Trans Am
  4. What was your first mobile phone? –A Motorola DynaTac. 
  5. What is your first proper memory? – I recall nursery school at Bell Street School. It was a Unitarian Universalist church.
  6. Who was your first teacher? – Sister Mary Florentia.
  7. Which fictional character do you wish was real? – Thor!
  8. Where did you go on your first ride on an airplane? – Where else, into Orlando for a visit to Disney.
  9. Who was your first best friend? – a boy named Ben who lived across the street.
  10. What was your first detention for? – Never recall having had detention.
  11. What’s your strongest sense? – my Bullshit detector. (I left this one unchanged because I have a Class A bullshit detector.)
  12. Who was your first kiss? – Way, way back – what was her name. I can’t recall.
  13. What was the first film you remember seeing at the cinema? – Star Wars – the original.
  14. What’s the largest amount of money you’ve ever won? – $350 and that was in the 1980’s when the NE Patriots vs. the Bears game was on. I correctly predicted the spread.
  15. What’s the largest amount of money you’ve spent in one spree? – $1,200 – on a new laptop. And I’m looking to spend about the same for a new System76 laptop.
  16. If you had a warning label, what would yours say? – WARNING: Does not tolerate bigotry.
  17. Have you ever got sweet revenge on anyone? – I really haven’t had to do so. Karma if it is true has been more than enough. 
  18. Have you ever been to a live concert? – Oh yes – I’ve seen Earth Wind & Fire, P-Funk, and that’s about it.
  19. Have you ever been to see stand up comedy? – Got to see Sam Kinison way back when. He was a crazy son of a bitch, a shame that he’s gone. 
  20. Have you ever needed stitches? – Shall we start the count. The first round was 12 stitches spread across both arms from being bitten by a St. Bernard. Yeah, I know. Then there were the 14 stitches in my head from a car accident. Then the 4 stitches when I sliced my left index finger open trying to repair a connector. Then of course there are the stitches for when I had my wisdom teeth out.

Why I still call them Tea Baggers

This cartoon prompted me to do a little writing.

Tea Bagger Shutdown

For you see I’m not the only one that remembers the symbols they chose to represent themselves, and what they proudly called themselves until someone clued them that tea bagging had sexual connotations. Then they suddenly became the Tea Party Patriots and other ludicrous shit like that. But I still call them Tea Baggers for two reasons:

1) It is the original name they chose for themselves and so I do them an honor by using that term. Yeah right.

2) It irks the ever loving hell out of them now. I find that online, I’m happiest when I know I’ve pissed on someones corn flakes. And I do love pissing off Tea Baggers. It’s not difficult as they seem to have rather delicate sensibilities and zero sense of humor.

But I was reading a post on Salon titled “Modern GOP is still the party of Dixie” yesterday and it tried to explain why about 30% of the population, mostly southern, rural, white people still harbor such animus toward government and toward the President.

But a couple a paragraph jumped out at me:

The Republican belief that it would be better to suspend the government (or default on the debt) than to fund “Obamacare,” for instance, can be explained only by this kind of wrathful, embattled logic. There is a sense in which the current shutdown is the culmination of the last 50 years of Republican history. Today’s GOP is the heir of Reagan’s remark that “[G]overnment is not the solution… government is the problem,” even as Reagan embodied the strident, anti-statist dogmas of Barry Goldwater. The Party’s development since 1964 has, in effect, been one long preparation for the time when it would have to argue that no government would be better than liberal government. It would make no sense to say this if liberals were simply misguided souls with some bad policy ideas. It makes perfect sense when one sees them through the prism of Tea Party doctrine: as illegitimate interlopers from the outer darkness whose intent is to exploit and subvert the normative American community.

I’m not sure why they see liberalism as a darkness – think about what liberal means.

Part of the reason this Dixie thing or white, southern and rural phenomenon exists is because they’ve never had any exposure to people other than white conservative types.

I have a solution for this – create a national year of service for all graduating high school seniors in the U.S., akin to the CCC or the WPA. Sure it won’t sell with the Repugs and Tea Baggers. But I don’t think they’re going to be in control too much longer. 

Take kids in the urban areas and have them do improvement projects in the deep south, take kids in the deep south and shuffle em’ to the coasts and northeast. Mix society up a little bit. It’s what happens in cities, right?  I say this because the best period in the U.S. happened immediately after World War II. You had kids from all over the U.S. being sent off into Europe and Asia to fight against the Germans and Japanese. And you had all sorts of mixing and matching going on.

In other words, get them out there, let them see that we’re not really an other to be feared but one to be embraced.

Neil deGrasse Tyson on Corruption

This is fantastic.

Now the talk show host makes a good point, just put em’ all on a spacecraft with no food, water etc.

But why expend the energy to fire them into a black hole. Granted the spaghettification would be spectacular.

You know at one time I just wanted to get them all in one place, say a stadium in butt fuck America. And then drop a 10 megaton nuke on it. Make them go from solid to gaseous in micro or nano seconds. But then it occurred to me, why not do what the Golgafrinchams did. First spread the rumor that a giant earworm is coming to eat the Earth. Then build stellar spacecraft and pack them all on it saying that they are the future of the human race on another planet. Program the ship to crash directly into the sun.

Note the themes in that paragraph – into the sun, certain doom, etc. They come directly from the Hitchhikers Guide to the Galaxy. Come to think of it, we could do pay-per-view of the event and wipe out the national debt in the process.

A little Classic Disco for a Saturday (And a little more)

Remember this one? Here’s Jackie Moor with “This Time Baby” from 1979:

Or how about this, Diana Ross with “The Boss”:

And then there’s Bonnie Pointer with “Heavy Must Have Sent You”:

And a personal favorite, even if she has gone all Christian is Stephanie Mills with “Never Knew Love Like This Before”:

And a little Shalamar to round it out. Shalamar produced both Jodi Watley and Howard Hewett on solo efforts in the 1980’s.

Which leads me to:

Jodi Watley feat. Eric B. and Rakim here’s “Friends”

*Side Note – Whodini also did a song called “Friends”:

And Howard Hewett gives us “For the Lover in You”: