Skip to content

Instantly share code, notes, and snippets.

View mtvillwock's full-sized avatar

Matthew Villwock mtvillwock

View GitHub Profile
Node = Struct.new(:value, :next)
class LinkedList
def initialize(*values)
@head = Node.new(values.shift, nil)
values.each { |v| add(v) }
end
def add(value)
current = @head
@mtvillwock
mtvillwock / alias
Last active August 29, 2015 14:13 — forked from jaredsmithse/alias
alias gs='git status'
alias gc='git commit -m'
alias gb='git branch'
alias gaa='git add --all'
alias gco='git checkout'
alias gpom='git push origin master'
alias gplom='git pull --rebase origin master'
alias ga='git add'
alias gd='git diff'
URL list from Tuesday, Jan. 13 2015 23:57 PM
To copy this list, type [Ctrl] A, then type [Ctrl] C.
oop - How is almost everything in Javascript an object? - Stack Overflow
http://stackoverflow.com/questions/9108925/how-is-almost-everything-in-javascript-an-object
javascript - Everything is an object? - Stack Overflow
http://stackoverflow.com/questions/19165021/everything-is-an-object
@mtvillwock
mtvillwock / gist:c27f8f8917d698486965
Last active September 3, 2015 03:54 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@mtvillwock
mtvillwock / clojure.md
Last active September 5, 2015 10:30 — forked from rakhmad/clojure.md
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@mtvillwock
mtvillwock / Gemfile
Created January 19, 2017 05:46 — forked from iamvery/Gemfile
source "https://rubygems.org"
gem "gnuplot"
gem "highline"
@mtvillwock
mtvillwock / Locales.yaml
Created January 20, 2017 00:20 — forked from wojtha/Locales.yaml
config.exceptions_app and ExceptionController
# config/locales/en.yml
en:
exception:
show:
not_found:
title: "Not Found"
description: "The page you were looking for does not exists."
internal_server_error:
title: "Internal Server Error"
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}
@mtvillwock
mtvillwock / bullshit.js
Created July 26, 2017 19:22 — forked from raydog/bullshit.js
Bullshit as a Service
var E_PREFIX_RATE = 0.25;
// All of our word lists:
var _word_lists = {
verb : [
"implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace",
"enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize",
"morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate",
@mtvillwock
mtvillwock / about.md
Last active February 1, 2018 22:07 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer