View gennerate_passwd.py
This file contains 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) |
View get_chef_packages.rb
This file contains 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 |
View gist:9340275
This file contains 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 |
View gist:10645605
This file contains 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 |
View gist:10712912
This file contains 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 |
View gist:11359549
This file contains 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 |
View user_agent.yml
This file contains 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
iPhone 5s: | |
carrier: SoftBank | |
ua: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 | |
width: 640 | |
height: 1136 | |
Nexus 5: | |
carrier: Others | |
ua: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari/537.36 | |
width: 1080 | |
height: 1920 |
View remove-old-kernel.sh
This file contains 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
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d') |
View gist:55c8650985cb519355c2
This file contains 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
... | |
==> fontforge -lang=py -script /private/tmp/ricty-JOuT/Ricty-3.2.3/scripts/powerline-fontpatcher [] Ricty-Bold.tt | |
Executable based on sources from 14:57 GMT 31-Jul-2012-D. | |
Library based on sources from 14:57 GMT 31-Jul-2012. | |
usage: powerline-fontpatcher [-h] [--no-rename] [--source-font font] | |
font [font ...] | |
powerline-fontpatcher: error: argument font: can't open '[]': [Errno 2] No such file or directory: '[]' | |
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting | |
If reporting this issue please do so at (not Homebrew/homebrew): |
View gist:3f6b95dec568c9674163
This file contains 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
for i in `aws ec2 describe-security-groups | jq -r '@csv "\(.SecurityGroups[] | [.GroupId, .GroupName])"'`; do aws ec2 create-tags --resources `echo $i | cut -d ',' -f 1 | tr -d '"'` --tags Key=Name,Value=`echo $i | cut -d ',' -f 2 | tr -d '"'` ; done |
OlderNewer