ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]
ipdb> self.client.session.update({'admin_mode': True})
ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]
ipdb> self.client.session['admin_mode'] = True
ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]
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
#/* USAGE: sh hello.c | |
gcc ./$0 -o ./${0%.*} | |
./${0%.*} | |
exit $? | |
*/ | |
#include <stdio.h> | |
int | |
main(void) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.willboyce.github-stars</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sync_github_stars</string> |
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
const int TEMP_PIN = 0; | |
const int RED = 12; | |
const int GREEN = 13; | |
const int BLUE = 11; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(RED, OUTPUT); | |
pinMode(GREEN, OUTPUT); |
I hereby claim:
- I am wrboyce on github.
- I am wrboyce (https://keybase.io/wrboyce) on keybase.
- I have a public key whose fingerprint is ECE2 4D2B B628 9DB7 7A22 B114 4E27 760A 8590 3481
To claim this, I am signing this object:
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
def parse_fat_time(nhex): | |
if not isinstance(nhex, basestring): | |
nhex = '{}'.format(nhex) | |
if nhex.startswith('0x'): | |
nhex = nhex[2:] | |
h = ''.join([nhex[2:], nhex[:2]]) | |
b = bin(int(h, 16))[2:] | |
s = b[-5:] | |
m = b[-11:-5] | |
h = b[-16:-11] |
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
200g dark chocolate (about 60% cocoa solids) | |
200g butter | |
1 tbsp instant coffee granules | |
85g self-raising flour | |
85g plain flour | |
1⁄4 tsp bicarbonate of soda | |
200g light muscovado sugar | |
200g golden caster sugar | |
25g cocoa powder | |
3 medium eggs |
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
--- | |
- hosts: all | |
remote_user: root | |
sudo: no | |
tasks: | |
- name: Add user wrboyce | |
action: user name=wrboyce comment="Will Boyce" groups=sudo password="<bzzt>" | |
- name: Add SSH key to user wrboyce | |
action: authorized_key user=wrboyce key="{{ lookup('file', '~/.ssh/id_rsa.pub') }}" |
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
diff --git a/iTerm.plist b/iTerm.plist | |
index 8eda455..a56899a 100644 | |
--- a/iTerm.plist | |
+++ b/iTerm.plist | |
@@ -67,7 +67,7 @@ | |
<key>CFBundleIconFile</key> | |
<string>iTerm.icns</string> | |
<key>CFBundleIdentifier</key> | |
- <string>com.googlecode.iterm2</string> | |
+ <string>com.googlecode.iterm2-visor</string> |
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
# regular gzip | |
major:~/Downloads% time gzip 5000M.rnd | |
gzip 5000M.rnd 21.70s user 1.04s system 99% cpu 22.845 total | |
major:~/Downloads% du -h 5000M.rnd.gz | |
4.6M 5000M.rnd.gz | |
major:~/Downloads% time gunzip 5000M.rnd.gz | |
gunzip 5000M.rnd.gz 8.41s user 1.59s system 92% cpu 10.783 total | |
# pigz, multi-core gzip | |
major:~/Downloads% time pigz 5000M.rnd | |
pigz 5000M.rnd 49.46s user 1.57s system 1468% cpu 3.476 total |