Skip to content

Instantly share code, notes, and snippets.

View nwest's full-sized avatar

Nate West nwest

  • Detroit, Michigan
View GitHub Profile
@nwest
nwest / haskell.md
Last active December 19, 2018 16:08
Advent of Code 2018 Day 5: Alchemical Reduction

Problem

Given a combination of polymers, represented by a string of uppercase and lowercase characters, remove the reactions that can take place until no reactions remain. What's the length of the string that has no more reactions?

A reaction can take place if two subsequent letters are the same letter with opposite cases.

  • "aA" reacts.
  • "Aa" reacts.
  • "AA" does not react.
  • "aa" does not react.
"AARON":["An extra A, to match your extra chromasome."],
"DJANGO":["Did you mean the over-rated musician with the stupid name or the overcomplicatd web framework with the stupid name?"],
"ABBY":["Abby. Gets stabby. Don't make her crabby! Abby."],
"KANYE":["Watch the Throne was really disappointing."],
"ABDUL":["Abdul. What a ghoul. Smells like drool. Abdul."],
"WIL":["You watch sports with a horse head on. And your name is stupid."],
"ABE":["Let's be honest. Your name is stupid."],
"BIZ":["Biz is as bad a name for a person as Jelly is for a company."],
"ABEL":["I hope your brother kills you."],
"ABIGAIL":["Hebrew for \"her father's joy.\" Your father's joy must have been making his daughter live with a shitty name."],
@nwest
nwest / dlreddit.coffee
Last active December 12, 2015 04:48
Pulls a random image from a subreddit and post the URL
# Description:
# Pulls a random image from a subreddit
#
# Dependencies:
# request
#
# Configuration:
# None
#
# Commands:

Greetings and Welcome Explorer,

I am glad that you found your way here. You deserve better than another routine day of drudgery aboard the Stellar Patrol Ship Feinstein. I think we want to work with you.

Detroit Labs is in the business of creating mobile apps. We do this by inviting the best and most interesting people to join our team, and asking them to solve the hard problems that go along with building and shipping software. Since you are reading this, you may be one of those people. I hope so!

@nwest
nwest / gitio
Created January 9, 2013 16:07 — forked from defunkt/gitio
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
We couldn’t find that file to show.
@nwest
nwest / gist:2439930
Created April 21, 2012 22:11
Sassy Fun
$fullWidth: 960px;
$colWidth: 60px;
$colPerct: $colWidth/$fullWidth * 100 + 0%; //Damn That's Hackey
$gutterWidth: 10px;
.container {
padding: 0 20px;
}
.row {
@nwest
nwest / gist:2437344
Created April 21, 2012 14:23
Sinatra Boiler
#config.ru
require 'bundler/setup'
Bundler.require :default, :"#{ENV['RACK_ENV']}"
require './app.rb'
run Sinatra::Application
#app.rb
configure do
disable :run
get '/js/script.js' do
coffee :script
end
@nwest
nwest / ios-bootcamp.md
Last active August 29, 2015 14:26
iOS Bootcamp

iOS Bootcamp Requirements

Your goal is to build an app or set of apps that incorporate the following features:

  • Interaction with an external API
    • Model serialization and deserialization from JSON
    • Demonstrable understanding of asynchronous code, including error handling
    • Bonus for: requests that are not just GET (Other CRUD?)
    • Bonus for: Authenticated requests (oAuth?)