Skip to content

Instantly share code, notes, and snippets.

@kern
kern / hh-descomp.md
Last active August 29, 2015 14:12
Hackathon Hackers Design Competition

Hackathon Hackers Design Competition

View the submissions and vote!

HH and HH Design have teamed up to host the first Hackathon Hackers Design Competition!

The cover photo for Hackathon Hackers is OLD. Like ancient. Like it’s the same one uploaded the day this group was created. It’s time for an update.

The creativity of the hacker community knows no bounds. We’re hoping you can come up with cover photo concepts that capture the unique ethos of student hackathons. So take some time out of your holiday break, spin up your favorite image editor, and try your hand at branding HH.

# Let's assume that google has a Location header like the following: (It does)
# Location: http://www.google.com/
# Let's create a new Response using RestClient.
response = Webbed::Response.new(RestClient.get 'http://google.com')
# Now, we can do this:
response.location # => "http://www.google.com/"
# Let's follow that URL.
# Install homebrew
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"
# Install git
brew install git
# Update homebrew
brew update
# Install homebrew packages
@kern
kern / webhook_callbacks.rb
Created July 19, 2011 17:02
WebhookCallbacks for God
module God
module Contacts
class WebhookCallbacks < Webhook
def notify(message, time, priority, category, host)
data = {
:message => message,
:time => time,
:priority => priority,
:category => category,
:host => host
# First, delete all the other bhrobotics directories.
# Then copy and paste these commands in order:
git clone git@github.com:CapnKernul/bhrobotics.com.git
cd bhrobotics.com
gem install bundler
gem install rails
bundle install
bundle exec rake db:migrate
rails server
#include "Time.h"
#include "SD.h"
#define SAMPLE_TIME 40
#define MAX_ENTRIES 100
#define MAX_ENTRIES_PER_FILE 25000
#define BUTTON_PIN 9
int running = 0;
int entries = 0;
int entries_in_file = 0;
#include "Time.h"
#include "SD.h"
#define SAMPLE_TIME 40
#define ENTRIES_PER_FILE 25000
#define DELAY_BETWEEN_FILES 2000
#define BUTTON_PIN 9
int running = 0;
int entries = 0;
File file;
@kern
kern / gist:1910457
Created February 25, 2012 20:32
Problem Report for iWebInspector (XCode 4.3, Lion)
Process: iWebInspector [83536]
Path: /Applications/iWebInspector.app/Contents/MacOS/iWebInspector
Identifier: mobi.firt.iWebInspector
Version: 0.9 (1)
Code Type: X86-64 (Native)
Parent Process: launchd [300]
Date/Time: 2012-02-25 12:28:36.535 -0800
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
@kern
kern / slow_virtus_spec.rb
Created October 17, 2012 10:05
How would you test Person in isolation?
require "virtus"
require "rspec/autorun"
class Address < Virtus::Attribute::Object
primitive String
def coerce(value)
# Simulate a slow call to an external service that normalizes the
# address's format.
sleep 1
@kern
kern / README.md
Last active January 6, 2016 02:09
TensorFlow + CUDA 7.0 AWS g2 instance installation script.

First, install all of TensorFlow and CUDA's dependencies:

$ # When prompted: Keep the local version currently installed
$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_deps.sh | sh

Wait for reboot, then run:

$ # When prompted: Scroll all the way down > accept > y > y > y > default (/usr/local/cuda-7.0) > y > n
$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_nvidia.sh | sh

$ curl https://gist.githubusercontent.com/kern/ab56600768b9f4fc1f72/raw/8d0b86a678d1398be2b82ac6e4ab1f8ad0698f01/install_tensorflow.sh | sh