Linux
Using SSH to bring local ports home
by Hans Kokx on Apr.27, 2013, under Linux, Mac OS X, Visitor Favorite
While developing a web application on a test server, I had a need to view the page in my browser. Unfortunately, the server was locked away behind a firewall, and the only port I had available was 22, for SSH. At that, the only way to SSH to that box is to hop through a different box. So, our scenario begins to look like this: (continue reading...)
Yes!
by Hans Kokx on Oct.18, 2010, under Linux, Tips & Tricks
An oft neglected command (perhaps because it is little known, or perhaps because we tend not to think of the utility it provides) is the command "yes." There are no options for the command yes, but that does not mean it is any less powerful.
Sidestepping Windows Login Credentials
by Hans Kokx on Feb.21, 2010, under Linux, Security, Tips & Tricks, Visitor Favorite, Windows
It's no secret that Windows security is akin to that of cheesecloth. As if you needed yet another reason to switch to a real operating system, let's take a look at how to get administrative access on any Windows 2000, XP, Vista, or 7 box that you can physically access, and change the boot medium on.
Modlog – a BASH modular logger
by Hans Kokx on Nov.10, 2009, under Bash Scripts, Linux
Introduction
This summer, I had the good fortune to spend several months working at the University of Michigan. One of the tasks assigned to me was devising a method for data collection over time for certain types of data. In particular, we were looking to collect information from /proc/meminfo and out of our lm_sensors output.
The issue that we came across with logging these sets of data was that they were set up for one-time viewing. That is, they looked similar to the following: (continue reading...)
The weather in your Geektool arsenal
by Hans Kokx on Dec.11, 2008, under Bash Scripts for OS X, Batch Scripts, Linux, Mac OS X, Visitor Favorite
Sitting in the dark, as many of us geekly types often do, I don't look out the window much. I also don't like surprises. Needless to say, I don't like clamoring out of my cove only to find that it's raining. Or snowing. Or 127º. So, I came up with a simple solution: let Geektool keep me up to date with the weather. This script requires you to have lynx installed, so if you don't already have it, head on over to MacPorts or Fink and grab yourself a copy (either sudo fink install lynx or sudo port install lynx, depending on your flavor.) Dump the following script into your favorite editor, and chmod +x it. (I threw mine into /usr/bin). (continue reading...)
One step backup and restore in Linux
by Hans Kokx on Jun.11, 2008, under Backups, Linux
Backup
Backups are more than a good idea these days; they're a necessity. Whether it's photos and documents, or million-dollar databases, losing your data is never a good idea - especially when doing a backup is so simple.
S-Video as your primary video output in linux
by Hans Kokx on May.14, 2008, under Linux
I had a lot of problems getting my Linux box to use my S-Video connection as it's primary and only display adapter. First, it would POST (black and white only) then, when X started, it would just cut out signal entirely. I'm still not entirely sure why this is, but I have come up with a solution anyway. First, one should note that if a VGA cable is plugged in, the system will mirror output through post, but will immediately cut out the S-Video once X starts. To get around this, we need to unplug the VGA cable, and work strictly off the S-Video. Not to worry once the X server cuts video feed to S-Video, as a terminal console does not use the X display drivers. To switch to a console, simply hold CTRL and ALT, and use a Function key (F1-F12.) F7 is typically reserved for the X display, so I like to use F2. Once you're in a console, display should pop back up on your TV (horray!). Then, we need to kill X. Depending on what distro you're using, and what window manager you're using, the commands vary. On Ubuntu, the command would be: (continue reading...)