This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/sh | |
echo -n "5-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind | |
echo -n "5-1:1.0" > /sys/bus/usb/drivers/usbrh/bind | |
echo -n "5-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind | |
echo -n "5-2:1.0" > /sys/bus/usb/drivers/usbrh/bind | |
ls /proc/usbrh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[unix_http_server] | |
file=/var/run/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default | |
;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface) | |
;username=user ; (default is no username (open server)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show 256 terminal colors | |
for i in {0..255} ; do | |
printf "\x1b[38;5;${i}mcolour${i}\n" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tomahawk -h h1 uptime | |
Traceback (most recent call last): | |
File "/usr/bin/tomahawk", line 4, in ? | |
from pkg_resources import require; require('tomahawk==0.7.0') | |
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2479, in ? | |
working_set.require(__requires__) | |
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 585, in require | |
needed = self.resolve(parse_requirements(requirements)) | |
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 483, in resolve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num calls time self name | |
----------------------------------------------------------------------------------- | |
1) 1 205.59 205.59 71.91% 205.59 205.59 71.91% rbenv | |
2) 4 40.86 10.21 14.29% 40.86 10.21 14.29% compaudit | |
3) 2 79.44 39.72 27.79% 38.58 19.29 13.50% compinit | |
4) 1 0.29 0.29 0.10% 0.29 0.29 0.10% bashcompinit | |
5) 2 0.22 0.11 0.08% 0.22 0.11 0.08% compdef | |
6) 1 0.21 0.21 0.07% 0.21 0.21 0.07% is-at-least | |
7) 1 0.16 0.16 0.05% 0.07 0.07 0.03% complete | |
8) 1 0.05 0.05 0.02% 0.05 0.05 0.02% exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# get_packages.rb <el5|el6|deb> | |
# | |
require 'net/http' | |
require 'rexml/document' | |
case ARGV[0] | |
when 'el5', 'el6', 'deb' | |
package = ARGV[0] | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from crypt import crypt | |
from random import choice | |
import string | |
import sys | |
salt_pop = string.letters + string.digits + '.' + '/' | |
salt = '' | |
for i in range(8): | |
salt = salt + choice(salt_pop) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read SERVICE | |
do | |
service $SERVICE stop | |
chkconfig $SERVICE off | |
done << EOL | |
ip6tables | |
iptables | |
netfs | |
EOL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
mkdir /mnt/cdrom | |
mount -r /dev/cdrom /mnt/cdrom | |
cd /tmp | |
tar zxf /mnt/cdrom/VMwareTools-*.tar.gz | |
./vmware-tools-distrib/vmware-install.pl --default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read SERVICE | |
do | |
service $SERVICE stop | |
chkconfig $SERVICE off | |
done << EOL | |
acpid | |
auditd | |
autofs | |
bluetooth | |
firstboot |