Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am wengzilla on github.
  • I am wengzilla (https://keybase.io/wengzilla) on keybase.
  • I have a public key whose fingerprint is B3F1 4DE7 9F5D ADC7 94DE CAF0 B707 8861 2240 530D

To claim this, I am signing this object:

View links.txt
View concordance.java
public class Concordance {
public static void main(String[] args) {
System.out.println(args[0]);
In in = new In(args[0]);
String[] words = in.readAllStrings();
// String[] words = StdIn.readAll().split("\\s+");
// Not sure this is the intended behavior, I believe it's supposed to do the splitting on the input file.
ST<String, SET<Integer>> st = new ST<String, SET<Integer>>();
for (int i = 0; i < words.length; i++)
{
View template.html
<html ng-app="TemplateApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
</head>
<body>
<div ng-controller="TemplateController">
<h1>Input</h1>
<div id="templateInputs">
View gist:8570574
package main
import (
"crypto/sha1"
"fmt"
"io"
"bytes"
"os"
"bufio"
"os/exec"
View wheel_of_fortune.rb
require 'nokogiri'
require 'open-uri'
class Analyzer
attr_accessor :frequency_table
def initialize
@frequency_table = Hash.new(0)
end
View gist:7000289
# Script written by Fletcher Nichol (fnichol)
require 'net/http'
# create a path to the file "C:\RailsInstaller\cacert.pem"
cacert_file = File.join(%w{c: RailsInstaller cacert.pem})
Net::HTTP.start("curl.haxx.se") do |http|
resp = http.get("/ca/cacert.pem")
if resp.code == "200"
View du.ino
#include <Servo.h>
bool debug = false;
int index = 0;
char messageBuffer[12];
char cmd[3];
char pin[3];
char val[4];
View shipping.rb
require 'yaml'
file_data = YAML.load_file('shipping.yaml')
class ShippingData
def initialize(attr={})
@sd_data = attr
end
View titleize.js
String.prototype.titleize = function() {
var words = this.split(" ")
var word_count = words.length
for(var i = 0; i < word_count; i++)
if(i == 0 || !is_article(words[i]))
words[i] = words[i].capitalize()
return words.join(" ");
}