Skip to content

Instantly share code, notes, and snippets.

View wrboyce's full-sized avatar

Will Boyce wrboyce

View GitHub Profile
@wrboyce
wrboyce / hello.c
Last active August 29, 2015 14:17
#/* USAGE: sh hello.c
gcc ./$0 -o ./${0%.*}
./${0%.*}
exit $?
*/
#include <stdio.h>
int
main(void)
<?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>
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);
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')]

Keybase proof

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:

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]
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
---
- 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') }}"
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>
# 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