Skip to content

Instantly share code, notes, and snippets.

@benburwell
benburwell / update-nvidia-drivers.sh
Created July 26, 2015 18:03
How to update NVIDIA drivers after upgrading to Ubuntu 15.04
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/349.16/NVIDIA-Linux-x86_64-349.16.run
chmod u+x NVIDIA-Linux-x86_64-349.16.run
sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-349.16.run
@benburwell
benburwell / yaml-to-json.rb
Last active August 29, 2015 14:17
YAML to JSON in Ruby
require 'yaml'
require 'json'
data = YAML.load_file 'legislators-current.yaml'
File.write 'legislators-current.json', data.to_json
@benburwell
benburwell / minified_scss_in_jekyll.html
Created January 16, 2015 02:55
Including minified SCSS in Jekyll layouts
<style type="text/css">
{% capture fonts %}
{% include fonts.scss %}
{% endcapture %}
{{ fonts | scssify }}
</style>
@benburwell
benburwell / keybase.md
Created January 8, 2015 02:11
Proof-of-identity for keybase.io

Keybase proof

I hereby claim:

  • I am benburwell on github.
  • I am benburwell (https://keybase.io/benburwell) on keybase.
  • I have a public key whose fingerprint is B444 48F3 E5DA 064E 09E0 5F06 6661 12D9 67A3 6ECD

To claim this, I am signing this object:

@benburwell
benburwell / less-pre-commit-hook
Created December 27, 2014 20:04
Git pre-commit hook to compile LESS files
#!/bin/sh
export PATH=/usr/local/bin:$PATH
cd /Users/Ben/Documents/Code/benburwell.github.io/assets/less
lessc --clean-css style.less ../css/style.css
cd /Users/Ben/Documents/Code/benburwell.github.io
git add /Users/Ben/Documents/Code/benburwell.github.io/assets/css/style.css
@benburwell
benburwell / fix_messages.sh
Created December 13, 2013 16:23
Makes notifications come back for Messages in Mavericks.
#!/bin/zsh
launchctl unload /System/Library/LaunchAgents/com.apple.soagent.plist
launchctl load /System/Library/LaunchAgents/com.apple.soagent.plist
@benburwell
benburwell / Swap.rb
Last active December 16, 2015 03:59
How to swap variables without the use of a temp variable.
# initial assignment
x = 5
y = 3
# print the values
puts "#{x}, #{y}"
# perform first xor
x = x ^ y