Skip to content

Instantly share code, notes, and snippets.

@seaneshbaugh
seaneshbaugh / emoticons.txt
Last active January 6, 2023 17:34
(。◕‿‿◕。)
( `ー´)
のヮの
( ˃ ヮ˂)
ಲ_ಲ
๏̯͡๏)
(  ゚,_ゝ゚)
ಠ_ಠ
(″・ ิ_・ิ)っ-̾
Σщ(゚Д゚щ)
@seaneshbaugh
seaneshbaugh / gatherer.rb
Last active September 5, 2018 10:16
MTG scraper
require 'active_support/core_ext/string'
require 'mechanize'
require 'optparse'
require 'ostruct'
require 'pry'
require 'tempfile'
class CardSet
attr_accessor :name, :cards
@seaneshbaugh
seaneshbaugh / shows.txt
Last active October 19, 2023 17:37
Shows
7/21/08 @ Rubber Gloves (Denton, TX)
Power Trip
Iron Age
Trash Talk
Cold World
7/26/08 @ Sons of Hermann Hall (Dallas, TX)
Big Fresh
The Poison Control Center
The Apples in Stereo
@seaneshbaugh
seaneshbaugh / chop.rb
Created April 17, 2012 06:08
File Chopper
require "optparse"
require "ostruct"
class FileChopper
Usage = "Usage:
chop.rb FILE[S] [options]
Options:
-f, [--front] # Chop from the front
-l, [--lines] # Chop from each line
require 'mechanize'
banned_words = ['cute', 'financing', 'foreclosure', 'huge', 'zoning']
listings = File.open('listings.txt').readlines
agent = Mechanize.new
listings.each do |listing|
search_page = agent.get("http://www.homepath.com/listing/search?q=#{listing.strip}")
@seaneshbaugh
seaneshbaugh / floor.c
Last active December 11, 2015 17:09
Allocate and print two dimensional array.
#include <stdlib.h>
#include <stdio.h>
struct {
int width;
int height;
char **tiles;
} typedef Floor;
Floor *new_floor(int width, int height) {
@seaneshbaugh
seaneshbaugh / motion_buzzer.c
Created February 9, 2013 08:56
Arduino Sketches
int pirPin = 2;
int piezoPin = 12;
int pirState = LOW;
int pirInputValue = 0;
void setup() {
pinMode(piezoPin, OUTPUT);
pinMode(pirPin, INPUT);
Serial.begin(9600);
@seaneshbaugh
seaneshbaugh / wantlist.txt
Last active December 17, 2015 12:08
Merch Wantlist
I'm interested in any short or long sleeved shirts or zip-up hoodies from the following. Size medium.
A.N.S.
Acrostix
After the Bombs
All Girl Summer Fun Band
Allo, Darlin'
Alone in a Crowd
American Football
Arctic Flowers
@seaneshbaugh
seaneshbaugh / array_overlap.rb
Last active December 20, 2015 23:18
"Overlap" of two arrays
require 'minitest/autorun'
class Array
def max_overlap(a)
clone = self.clone
a.each do |n|
if clone.index(n)
clone.delete_at(clone.index(n))
end
def group_by(collection, fun) do
collection |> map(fn x -> { fun.(x), x } end) |>
List.foldr(HashDict.new, fn ({k, v}, d) ->
Dict.update(d, k, [v], fn([h | t]) ->
List.concat([v], [h | t])
end)
end)
end