Skip to content

Instantly share code, notes, and snippets.

@hornos
hornos / gist:9553620
Created March 14, 2014 18:19
jgestures.codeplex.com
lynx -dump https://jgestures.codeplex.com/documentation | grep "event '" | sed s/.*event\ \'//g | sed s/\'//g
@hornos
hornos / gist:6165588
Created August 6, 2013 15:35
just be
gpg -ac -o- README.md | wsend - 2> /dev/null
@hornos
hornos / gist:5870782
Created June 26, 2013 19:32
ansible prompt
if (( notime > 0 )) ; then
PS1="$(ps1_titlebar)$(ps1_identity)$(ps1_git)$(ps1_rvm)${separator}${prompt_char}${ps1_prefix} "
else
PS1="$(ps1_titlebar)\D{%H:%M:%S} $(ps1_identity)$(ps1_git)$(ps1_rvm)${separator}${prompt_char}${ps1_prefix}$(ps1_ansible) "
fi
}
ps1_ansible() {
if test -n "${ANSIBLE_HOSTS}"; then
echo ":${ANSIBLE_HOSTS}"
@hornos
hornos / gist:5329553
Last active December 15, 2015 21:59
neuromancer_sound_book
curl -s http://www.bearcave.com/bookrev/neuromancer/neuromancer_audio.html | grep Tape | sed s/.*=\"// | sed s/\".*// | awk '{print "http://www.bearcave.com" $1}'
@hornos
hornos / sgi_intel_turbo_boost
Created February 25, 2013 10:39
Switch on Intel Turbo Boost on SGI UV
#!/bin/bash
# remove the following line in /etc/modprobe.d/acpi-cpufreq
# install acpi-cpufreq /bin/true
read -p "Enable Intel Turbo Boost?"
modprobe -v acpi-cpufreq
sleep 2
maxcpu=$(grep processor /proc/cpuinfo | awk '{print $3}' | tail -1)
for cpu in $(seq 0 $maxcpu) ; do
cpufreq-set -c $cpu -g performance
@hornos
hornos / slurm_hung
Created January 18, 2013 18:44
slurm hung
scontrol update NodeName=uv2 State=DOWN Reason=hung_completing
@hornos
hornos / gpg.conf
Created December 20, 2012 22:51
gpg.conf
# http://www.debian-administration.org/users/dkg/weblog/48
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
@hornos
hornos / listen2
Created December 8, 2012 20:10
listen2
#!/bin/bash
lsof -i TCP -i UDP | awk '{printf("%8s%12s%8s%5s%4s %s %s\n",$2,$1,$3,$5,$8,$9,$10)}'
@hornos
hornos / slurm_acct
Created December 5, 2012 14:09
slurm_acct
#!/bin/bash
sacct -a --format=jobid,jobname,state,user,account,partition,alloccpus,elapsed | awk '{if(!match($0,"^[0-9]+.batch.*")) print}'
@hornos
hornos / search
Created December 2, 2012 16:14
search