Skip to content

Instantly share code, notes, and snippets.

View gist:3257764
def name_to_number(note_string):
notes = "C . D . E F . G . A . B".split()
name = note_string[0:1].upper()
number = notes.index(name)
acc = accidentals(note_string)
return mod12(number + acc)
def accidentals(note_string):
print note_string
View gist:3061307
# Wireless
auto wlan0
iface wlan0 inet dhcp
wireless-essid STRONGHOLD
wireless-defaultkey mykey?
View gist:2897496
[agd@enyo asound]$ lsusb -V
lsusb (usbutils) 004
[agd@enyo asound]$ sudo lsusb -v (Trimmed out the C-Media)
Bus 001 Device 009: ID 0d8c:0304 C-Media Electronics, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
View gist:2369219
Warning: opendir(/usr/local/etc/snort/snort_25748_em0/rules/): failed to open dir: Not a directory in /usr/local/www/snort/snort_rulesets.php on line 251 Warning: readdir(): supplied argument is not a valid Directory resource in /usr/local/www/snort/snort_rulesets.php on line 252 Warning: sort() expects parameter 1 to be array, null given in /usr/local/www/snort/snort_rulesets.php on line 255 Warning: Invalid argument supplied for foreach() in /usr/local/www/snort/snort_rulesets.php on line 256
View gist:1691149
@property
def samplerate(self):
if hasattr(self.mgfile.info, 'sample_rate'):
# Reasonably sure from checking documentation that all formats
# have this available.
return self.mgfile.info.sample_rate
else:
# Return and empty string, _if_ this ever happens
return ''
View gist:1680512
agd@alexandria:~$ sudo /etc/init.d/sickbeard start
Starting Sick Beard
agd@alexandria:~$ ps -ef | grep sickbeard
root 5293 1 0 21:15 pts/1 00:00:00 sudo -u sickbeard -EH nohup python /home/sickbeard/.sickbeard/SickBeard.py -q
1008 5294 5293 14 21:15 pts/1 00:00:00 python /home/sickbeard/.sickbeard/SickBeard.py -q
agd 5321 4021 0 21:15 pts/1 00:00:00 grep sickbeard
agd@alexandria:~$
View gist:1680497
agd@alexandria:~$ sudo /etc/init.d/sickbeard start
Starting Sick Beard
agd@alexandria:~$ ps -ef | grep sickbeard
agd 5130 4021 0 21:13 pts/1 00:00:00 grep sickbeard
View gist:1680458
agd@alexandria:~$ /etc/init.d/sickbeard restart
Restarting SickBeard
start-stop-daemon: warning: failed to kill 4559: Operation not permitted
No process in pidfile '/var/run/sickbeard/sickbeard.pid' found running; none killed.
View gist:1680455
############### EDIT ME ##################
# path to app
APP_PATH=/home/sickbeard/Sick-Beard/
# path to python bin
DAEMON=/usr/bin/python
# Path to store PID file
PID_FILE=/var/run/sickbeard/sickbeard.pid
PID_PATH=`dirname $PID_FILE`
View gist:1364879
agd@enyo ~$ sudo yum install gtk2-devel.i686 dbus-glib-devel.i686 qmmp.i686 rpm-build-libs.i686 rpm-devel.i686 gnome-keyring-devel.i686 libxml2-devel.i686 nss-devel.i686 libxslt.i686 glibc.i686 xterm
[sudo] password for agd:
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit, tidy-cache
Loading mirror speeds from cached hostfile
updates/metalink | 20 kB 00:00
* fedora: mirror.fdcservers.net
* rpmfusion-free: mirror.us.leaseweb.net
* rpmfusion-free-updates: mirror.us.leaseweb.net
* rpmfusion-nonfree: mirror.us.leaseweb.net
* rpmfusion-nonfree-updates: mirror.us.leaseweb.net
You can’t perform that action at this time.