This script will find all .rar files in a given directory and extract them into the specified directory. Requires the unrar binary installed in PATH.
usage: unrar-recursive.sh [directory to scan] [extraction destination dir]
- Running the script without arguments will search for all .rar files in the current directory and subdirectories and extract them all to the current working directory.
- Running the script with only 1 argument will search for all .rar files in the specified directory and extract them into the same directory.
#!/bin/bash
if [ "$#" -eq 0 ]; then dest=$1; else dest=$2; fi
find $1 -type f -iname "*.rar" -exec unrar e {} $dest \; |
Sources:

For some reason, Android versions greater than 2.3 no longer come with the Google CarHome app. This is an app that gives your phone a simplified interface for easier use in-car.
To install on a rooted device, download CarHomeGoogle.apk
Copy it to /system/app, set permissions to -rw-r–r– (644) and user/group owner to root.
I have a few old reliable AR5005G (5212, PCI 168c:0013) cards, both MiniPCI and Cardbus from the heyday of Wireless-G back in the early ’00s. Back then, Atheros 500x series cards were THE cards to have if you wanted to have some fun with aircrack, or if you just wanted your WiFi to actually WORK, especially under Linux. The madwifi (aka ath_pci) drivers were probably the most stable wireless drivers at the time. Even on Windows, you could use 3rd party drivers to put the cards in monitor mode and capture packets.
Times have changed and madwifi has been superseded by ath5k (and indirectly ath9k).
For some reason I decided to install Ubuntu 12.04 on an old Fujitsu Lifebook (Pentium III 600MHz, upgraded 512MB RAM, ATI Mobility Radeon M4) without built-in wireless, using a Netgear WPN511 Cardbus adapter. I expected everything to work as it did in the old days, but for some reason the WiFi wouldn’t stay connected.
It seems the hardware encryption capabilites on the card don’t quite support WPA2/CCMP-AES, even though the ath5k driver says it does. So the solution is to disable hardware encryption support:
echo "options ath5k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath5k.conf
Then reboot, or reload the ath5k module (modprobe -rv ath5k, modprobe -v ath5k).
Now I can enjoy my surprisingly not-extremely-slow 10-year old laptop wirelessly.
Source: http://ubuntuforums.org/showthread.php?p=12086356#post12086356
http://madwifi-project.org/
Hardware, Linux, Software
|
ar5005, ar500x, ar5212, ath5k, atheros, disconnect, driver, encryption, linux, ubuntu, wifi, wireless, wpa, wpa2
apt-cache search [searchterm]
search local apt-cache for a package containing [searchterm]
apt-file list [packagename]
lists all files associated with [packagename], even if the package is not installed
apt-file search [/path/to/file]
search for the package that “owns” [/path/to/file]
apt-cache madison [packagename]
displays all available versions of [packagename]
apt-get install [packagename]=[version]
force apt to install a specific version of a package
I sometimes have to work from home, which means using VPN. Cisco VPN works quite well, but it’s just not the same as being on the corp network.
Using a spare DD-WRT router (ASUS WL-520GU) running the VPN build of DD-WRT, I set up a persistent VPN connection. Now when I connect my work PC to this router, it behaves just like it’s on the corporate LAN.
How to do it
- First, get the recommended DD-WRT VPN build from dd-wrt.com and flash the router.
- Connect the VPN router’s WAN/Internet port to your home LAN.
- Make sure your router’s LAN IP doesn’t conflict with any subnets in the corp network or your existing home LAN. I used 192.168.133.0/24.
- Add your corporate domains and DNS servers to the dnsmasq config (Services tab)

- Next, customize the script at the end of this post and paste in the Administration>Commands section. Click Save Startup.
- Reboot the router. Wait about 5 minutes (it takes a while to start up) and verify you can ping/access servers on the corp LAN.
- Done!
This isn’t exactly the most stable solution, but it works and I haven’t had any disconnects so far. Also much cheaper and much less trouble than setting up a site-to-site VPN using a real Cisco router.
One sticking point is that from now on any changes to router config (DHCP, WiFi, etc.) will require a reboot. Otherwise your VPN tunnel will die and won’t come back for some reason.
Also, speeds are limited by the router’s processor. Mine is only a 266MHz ARM, so IPsec puts quite a load on it, meaning I can only sustain speeds of about 2Mbps – sadly still better than some of our WAN sites that are using T1 lines.
Script
mkdir /tmp/etc/vpnc
rm -f /tmp/etc/vpnc/vpnc.sh
#Create the VPNC startup script in /tmp
echo '
#!/bin/sh
vpn_concentrator="your.vpn.gateway" ##enter ip or hostname of your Ipsec vpn concentrator
vpn_keepalive_host1="some.server.corp" ##enter the ip or hostname of a computer that is only reachable if vpn connection is established.
vpn_keepalive_host2="other.server.corp" ##enter the ip or hostname of a computer that is only reachable if vpn connection is established.
vpn_groupname="groupname" ##enter the group name here
vpn_grouppasswd="grouppass" ##enter the group password here
vpn_username="user" ##enter your username here
vpn_password="pass" ##enter your password here
#--do not edit this--
#Written by Alain R. 28.Sep.2007
#updated by Matthieu Y. 2012-09-24
vpnc-disconnect
rm -f /tmp/etc/vpnc/vpn.conf
#Create vpnc config file
echo "
IPSec gateway $vpn_concentrator
IPSec ID $vpn_groupname
IPSec secret $vpn_grouppasswd
Xauth username $vpn_username
Xauth password $vpn_password
" >> /tmp/etc/vpnc/vpn.conf
# allow dnsmasq to forward dns replies for LAN subnets
sed -i "s/stop-dns-rebind//g" /tmp/dnsmasq.conf
killall dnsmasq
dnsmasq --conf-file=/tmp/dnsmasq.conf
#Check if we can ping the IPs specified above
pingtest1 () {
ping -q -c1 $param1 >> /dev/null
if [ "$?" == "0" ]; then
echo 0 #reachable
else
echo 1 #not reachable
fi
}
pingtest2 () {
ping -q -c2 $param2 >> /dev/null
if [ "$?" == "0" ]; then
echo 0 #reachable
else
echo 1 #not reachable
fi
}
doloop=true
while [ $doloop==true ]; do
param1=$vpn_keepalive_host1;
if [ "`pingtest1`" == "0" ]; then
sleep 300
else
param2=$vpn_keepalive_host2;
if [ "`pingtest2`" == "0" ]; then
sleep 300
else
doloop=false
vpnc-disconnect
vpnc /tmp/etc/vpnc/vpn.conf --dpd-idle 0
sleep 1
if [ "`pingtest1`" != "0" ]; then
sleep 10
fi
tundev="`ifconfig |grep tun |cut -b 1-4`"
iptables -A FORWARD -o $tundev -j ACCEPT
iptables -A FORWARD -i $tundev -j ACCEPT
iptables -t nat -A POSTROUTING -o $tundev -j MASQUERADE
sleep 9
fi
fi
done
return 0;
' >> /tmp/etc/vpnc/vpnc.sh
chmod 700 /tmp/etc/vpnc/vpnc.sh
/tmp/etc/vpnc/vpnc.sh&
References:
Linux, Work
|
access, asus, cisco, corporate, dd-wrt, ipsec, remote, router, vpn, vpnc
The loss of your Drobo’s shared resource settings (i.e., the volumes do not show) can be caused when the server service in Windows starts up before the iSCSI Initiator service does. The server service needs the iSCSI service to have already started file shares.
To fix this issue, open a command prompt, type: “sc config LanManServer depend= MSiSCSI” and press Enter.
via Drobo Support.
WRONG WRONG WRONG. If you run the above command, the LanManServer (Server) service will fail to start.
The correct command for adding the dependency on the iSCSI service (on a stock Win2K8 box) is
sc config lanmanserver depend= SamSS/Srv/MSiSCSI
Running the other command deletes the original dependencies of the Server service and replaces them with only MSiSCSI.
Correct answer via User Error.
For a while now, Google has allowed you to sign in to multiple Google accounts and switch back and forth between them quite easily. Firefox also allows you to use Gmail as the default application for mailto: links.
This is all fine and dandy, until you click a mailto: link and decide you don’t want to send that e-mail using your primary Gmail account. In my case, this happens when replying to posts on craigslist. I always assumed there wasn’t a “clean” solution, resigning myself to copying and pasting the e-mail and subject lines, or even at times clicking the mailto: link on my Android phone, which allows me to select any account on my phone to send the e-mail from.
Finally decided to do some research and found a solution on the mozillazine forums.
To summarize:
- Go to about:config in Firefox
- Set gecko.handlerService.allowRegisterFromDifferentHost = true
- Open the Web Developer scratchpad. (Firefox> Web Developer> Scratchpad or Tools>Web Developer > Scratchpad)
- In the scratchpad, type the following line of JavaScript:
navigator.registerProtocolHandler("mailto",
"https://mail.google.com/mail/b/[email protected]/?extsrc=mailto&url=%s",
"Description of your Gmail Account"); |
- Repeat the line as many times as necessary, once for each of your Gmail accounts.
- Once you have created all the necessary lines, go to Execute > Run.
- The “information bar” will pop up in your main Firefox window, asking you if you want to add your Gmail account as a handler for mailto: links. Accept once for each account.
- That’s it. Now when you click a mailto: link, you’ll be prompted which Gmail account to use.
Software, Web
|
account, annoyance, craigslist, email, firefox, fix, gmail, google, javascript, mail, mailto, multiple accounts, tweak
ISO-8859-1
UTF-8
I run my site on Linux, using UTF-8 encoding soooo I can do this:
ééééààààççççëëëüôùòîîîïëë
without getting a bunch of this:
��������
Important note that nano on Linux always works in UTF-8 as far as I can tell, so to get a js file or what have you to display proper characters you’ll need to use iconv to convert the final file to ISO-8859-1/Latin-1 or whatever encoding you happen to be using.
iconv -c -f UTF-8 -t ISO-8859-1 someCamelCaseScriptFilename.js -o someOtherCamelCaseScriptFilename.js

Running Apache 2 (Debian) on Windows 2008, and Microsoft IIS on Linux. Like a boss.
via http://uptime.netcraft.com/up/graph?site=www.csdccs.edu.on.ca