Batch gpg Decrypt and Unzip

In Linux:

To batch decrypt with gpg:

echo {yourpassphrase} | gpg --passphrase-fd 0 --decrypt-files *.pgp

To batch unzip:

unzip "*.zip"
Posted in Linux General | Leave a comment

Common SQL Server Troubleshooting Queries

Last Query for All Open Connections (source):

SELECT    *
FROM    sys.dm_exec_requests er    
CROSS APPLY    sys.dm_exec_sql_text(er.sql_handle) AS t

Number of Open Connections (source):

SELECT 
    DB_NAME(dbid) as DBName, 
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE 
    dbid > 0
GROUP BY 
    dbid, loginame

Running Queries (Source):

SELECT sqltext.TEXT, req.session_id, req.status, req.command, req.cpu_time, req.total_elapsed_time 
FROM sys.dm_exec_requests req 
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext

Kill Query (Source)

Kill {id}

Posted in SQL Server | Leave a comment

PayPal Link Generator

PayPal used to let you create a payment link in addition to the current payment button.  The link was nice for a quick and dirty method when the button wasn’t needed, but PayPal seems to have done away with it.  The link below brings back the functionality. Thanks!

 

http://www.blogbyben.com/2009/04/paypal-link-generator-build-your-own-1.html

Posted in Geeky Stuff | 1 Comment

Quick DVD Backup to ISO on Linux

I often want an easy command line way to easily backup a standard definition (non-BlueRay) DVD to and ISO image.  The command line is nice because I can do it remotely on an idle MythTV Frontend machine and can copy the resulting ISO right to the mounted Movies folder.

Get DVD Info

dvdbackup -i /dev/dvd 

Backup whole DVD

dvdbackup -i /dev/dvd -o ~ -M

Make ISO

mkisofs -dvd-video -udf -o ~/dvd.iso ~/MOVIE_NAME

The information was taken from here: https://wiki.archlinux.org/index.php/Dvdbackup

Posted in Linux General, MythTV | Leave a comment

Remove Unsed Linux Kernels

I hate manually cleaning out all of the old kernels here is a script to do it for you:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

This was stole directly from here.

For good measure I run the following after to be sure the grub config is good:

sudo update-grub2

Reboot to make sure everything is OK.

Which much restraint I avoided including several bad un-popped popcorn references.

Posted in Linux General | Leave a comment

DSM Links

Road Racing Upgrade Path: http://www.dsmtuners.com/1g_dsm_road_racing_setup

Posted in 24 Hrs of LeMons / Chump Car Racing | Leave a comment

Spam-me-not E-mail Link Obfuscator

http://www.ianr.unl.edu/email/encode/

Posted in Geeky Stuff | Leave a comment

Ultra Marathon Race Web Sites

 

http://www.marathonguide.com/races/races.cfm

 

http://www.ultrasignup.com

Posted in Uncategorized | Leave a comment

Roomba Blink Error Codes

The little light to the left of the Clean light on the 500 series, which if it is there can look like either a little Roomba or an exclamation point is called the Check Robot light (according to the Customer Service rep on the phone who e-mailed me the info below). 



If your Roomba?s CLEAN light is blinking orange and the Check Robot light illuminates, the robot is experiencing a charging error. The Check Robot light will blink out the error number every 2 seconds. For example, if the robot has an error code 2, it will blink twice, pause for 2 seconds, blink twice, etc. 



Please watch your robot when the CLEAN light is blinking to determine what error code your robot is displaying. Please respond with this information so that we can assist you further. 



iRobot Roomba 500 Series Charging Error Codes 

Clean/Power light pulses orange and Check Robot ( ! ) light blinks a number of times every 2 seconds

1 Blink: No Display
No Voice
 Remove battery pull tab.
 Remove bottom cover, remove battery and make sure that there is nothing obstructing the contacts.
 Reinstall battery and securely tighten all 4 ?bottom cover screws?. (Tip: Tighten the 2 screws up front near the battery first.)
 If screws are missing, send replacements.
 If a bottom cover screw does not engage or cannot be tightened, the Roomba may need to be replaced.
 Replace battery if problem persists.

2 Blinks: Display – Err 2
 Voice: Charging Error 2?
 Replace Roomba, power supply & home base.

3 Blinks: Display – Err 3
 Voice: Charging Error 3
 Replace Roomba, power supply & home base.

5 Blinks: Display – Err 5
 Voice: Charging Error 5
 Remove battery pull tab.
 Move charging setup to a cooler environment.
 Replace power supply.

6 Blinks: Display – Err 6
 Voice: Charging Error 6
 Move charging setup to a cooler environment and make sure there is nothing sitting on top of the robot.
 Replace battery, Roomba, power supply & home base.

7 Blinks: Display – Err 7
 Voice: Charging Error 7
 Replace Battery .
 Replace Roomba if battery replacement does not solve the problem.

Posted in Uncategorized | Leave a comment

Setting default Runlevel

 

This was written for Fedora, not sure how many other other distros it applies to.

There are three ways to change your runlevel: 

* While the Computer is Running: 
1. Open a Terminal. 
2. Become root. 
3. Type: 

init number 

where number is the runlevel that you want to change to. 

You will then be switched into the new runlevel. 
* While You Are Booting the Computer: 
1. When you first start your computer, the GRUB screen (where you choose your Operating System) appears. Select the Fedora that you want to boot into, but press the a key instead of pressing Enter. 
2. You will see a line somewhat like the following: 

kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ acpi=on rhgb quiet 

Add the number of your runlevel to the end of that line, and then press Enter. For example, to boot into text-only mode, the line would look like: 

kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ acpi=on rhgb quiet 3 

You will then boot into the new runlevel this time only. 
* Permanently Set a Default Runlevel: 
1. Open a Terminal. 
2. Become root. 
3. Open the file /etc/inittab in your favorite text editor: 

gedit /etc/inittab 
4. Find the line: 

id:number:initdefault: 

where number is your current default runlevel (probably 5). 
5. Change the number in the middle of the line to the new runlevel that you want your computer to start in by default. For example, if you want to start in text-only mode by default, change it to: 

id:3:initdefault: 

You will then boot into that runlevel every time you start the computer.

Posted in Linux General | Leave a comment