Post thumbnail of Get a reversed list of command line arguments from sys.argv
12 October 2009
Continue reading Get a reversed list of command line arguments from sys.argv

Get a reversed list of command line arguments from sys.argv

This is useful if you need to look at the last arguments before deciding what to do, possibly for interoperability with some older code where the order of command line arguments is already set in stone.

Post thumbnail of Python script to cut some lines from the top a file
9 October 2009
Continue reading Python script to cut some lines from the top a file

Python script to cut some lines from the top a file

Hmm… I changed it to cut from the top and bottom:

Post thumbnail of Linux defeats W32.Virut.CF virus attack on Australian Power Grid
8 October 2009
Continue reading Linux defeats W32.Virut.CF virus attack on Australian Power Grid

Linux defeats W32.Virut.CF virus attack on Australian Power Grid

Australian news sites are reporting that Integral Energy, the company that supplies energy throughout New South Wales and Queensland, has suffered through a W32.Virut.CF virus outbreak. The company had to disinfect all 1000 of their desktops. The Sydney Morning Herald reported that the company’s anti-virus software hadn’t been updated since at least February. Luckily for the Aussies, the power grid’s servers run on Sun Solaris.

Post thumbnail of Remote desktop via VNC in SSH
8 October 2009
Continue reading Remote desktop via VNC in SSH

Remote desktop via VNC in SSH

rootninja@rootninja ~ ]$ ssh -Y remotehost “vncserver :1 && vncviewer localhost:1″
Starting applications specified in /home/rootninja/.vnc/xstartup
Log file is /home/rootninja/.vnc/remotehost.com:1.log

Post thumbnail of Geany is the best code editor
8 October 2009
Continue reading Geany is the best code editor

Geany is the best code editor

In the past i’ve used Eclipse, and that behemoth was a nightmare. The beast is a memory hog and just too bloated for my taste. Using plugins for php and python just make matters worse. I’ve always fallen back to vi (Vim) because of the severe headaches eclipse has caused me. hmm, I should sue… anyway, here’s the top reasons why Geany meets my criteria for the best code editor in the world…

Post thumbnail of What’s the best way to find the hostname in python?
7 October 2009
Continue reading What’s the best way to find the hostname in python?

What’s the best way to find the hostname in python?

Fifty million ways to get the hostname, choose one. But I couldn’t find a way to get the shortname without a system call to ‘hostname -s’. This is the best I could come up with, which would work with any of the above methods.

Post thumbnail of Why is it so hard to get Internet service without cable and phone?
6 October 2009
Continue reading Why is it so hard to get Internet service without cable and phone?

Why is it so hard to get Internet service without cable and phone?

So comcast, you want $99, that’s what you’re telling me, otherwise it’s $60 + $7 fee + $2.25 “tax” for the Internet by itself? Basically what they’re doing is extortion. My internet connection is my little corner store, and they’ll knock it over if I don’t pay up. Everything they advertise is just marketing gimmicks to make it look like you can get a service for a low price, but there’s really no such thing because it’s not an individual option.

Post thumbnail of Confusion over AN, JIC, SAE, and Military Spec flare fittings
5 October 2009
Continue reading Confusion over AN, JIC, SAE, and Military Spec flare fittings

Confusion over AN, JIC, SAE, and Military Spec flare fittings

Flare fittings are a pain in the butt in many respects. They are expensive to purchase as a regular consumer and require attention to detail in craftsmanship when creating flares from straight pipe. I use some of these fittings in automotive applications such as fuel lines between pump and filter and fuel rail to filter. They are most often found in brake line replacements to eliminate some of the squishiness between the time when the pedal is depressed and the hydraulic system reaches sufficient compression to begin activating.

Post thumbnail of Pointers, the way I learned them in school!
5 October 2009
Continue reading Pointers, the way I learned them in school!

Pointers, the way I learned them in school!

In the following code, we are creating a new variable called my_character and storing ‘a’ there.” This will be one byte in size. Whenever you create a string of text in the C language with quotes, you are actually storing that string somewhere in memory. That means that a string of text, just like all variables, has some address in memory where it lives. Now a pointer can only contain a memory address, so “Hello World!” must be a memory address.

Post thumbnail of Who’s afraid of a little swine flu?
1 October 2009
Continue reading Who’s afraid of a little swine flu?

Who’s afraid of a little swine flu?

The New York Times ran a story today reporting that “As soon as swine flu vaccinations start next month, some people getting them will drop dead of heart attacks or strokes, some children will have seizures and some pregnant women will miscarry.” Well isn’t that special. No need for alarm, nothing to see here move along.

 Page 36 of 58  « First  ... « 34  35  36  37  38 » ...  Last » 
Powered by Wordpress   |   Lunated designed by ZenVerse