Skip to content

Instantly share code, notes, and snippets.

Power Trip - Manifest Decimation
Tullycraft - Lost in Light Rotation
Cleric - Gratum Inferno
Mammoth Grinder - Underworlds
Krömosom - Nuclear Reich
Impalers - Impalers
Daft Punk - Random Access Memories
Charli XCX - True Romance
Infinite Void - Infinite Void
Darkthrone - The Underground Resistance
Carly Rae Jepsen - E•MO•TION
Skylar - Spence - Prom King
Absolut/Paranoid - Jawbreaking Mangel Devastation
Ryn Weaver - The Fool
Grimes - Art Angels
Absolut - Hells Highest Power
Electric Light Orchestra - Alone in the Universe
CHVRCHΞS - Every Open Eye
Vaaska - Todos Contra Todos
Anasazi - Nasty Witch Rock
@seaneshbaugh
seaneshbaugh / bcpl-instructions.md
Last active November 1, 2018 16:50
Instructions for getting up and running with BCPL

Download the BCPL source code.

$ wget http://www.cl.cam.ac.uk/users/mr/BCPL/bcpl.tgz

Unpack the BCPL source code.

$ tar -xf bcpl.tgz

Go to the BCPL source code directory.

@seaneshbaugh
seaneshbaugh / desired_weight.rb
Created February 16, 2016 16:50
Calculate desired weight based on body fat percentages
def desired_weight(current_weight, current_body_fat_percentage, desired_body_fat_percentage)
raise ArgumentError if current_weight < 0
raise ArgumentError if current_body_fat_percentage < 0
raise ArgumentError if current_body_fat_percentage > 100
raise ArgumentError if desired_body_fat_percentage < 0
raise ArgumentError if desired_body_fat_percentage > 100
def print_array_no_longer_than(strings, limit, indention)
lines = strings.each_with_object([]) do |string, acc|
if acc.last && acc.last.join("', '").length + 4 + string.gsub("'", "\\'").length + 4 < limit - indention
acc.last << lang
else
acc << [lang]
end
end
lines.each do |line|
@seaneshbaugh
seaneshbaugh / form.html.eex
Last active August 29, 2015 14:24
elixir haml
This is what I ultimately want to reproduce:
<%= form_for @changeset, @action, fn f -> %>
<div class="form-group">
<label for="page[title]">Title</label>
<%= text_input f, :title, class: "form-control" %>
</div>
<div class="form-group">
<label for="page[body"]>Body</label>
<%= textarea f, :body, class: "form-control" %>
@seaneshbaugh
seaneshbaugh / read-in-reverse.c
Created June 30, 2015 18:14
Read file in reverse
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
// This is set to be really small since my test file is only 10 bytes long.
size_t bufferSize = 4;
char * buffer = (char *)calloc(bufferSize, sizeof(char));
if (!buffer) {
defmodule Post do
defstruct [:id, :title, :body]
end
defmodule Exseed do
defmacro seed(model, do: block) do
quote do
var!(attributes, Exseed) = %{}
unquote(Macro.postwalk(block, &postwalk(&1, model)))
@seaneshbaugh
seaneshbaugh / user.ex
Last active February 23, 2016 10:02
user.ex
defmodule MyApp.User do
use MyApp.Web, :model
schema "users" do
field :username, :string
field :email, :string
field :password, :string, virtual: true
field :password_confirmation, :string, virtual: true
field :encrypted_password, :string
@seaneshbaugh
seaneshbaugh / dead_letter_exchange_test.rb
Created March 8, 2015 04:50
Bunny dead letter exchange test
require 'bunny'
number_of_messages = 10
queue_name = 'contact'
connection = Bunny.new
connection.start