Skip to content

Instantly share code, notes, and snippets.

View vosechu's full-sized avatar

Chuck Lauer Vose vosechu

View GitHub Profile
@vosechu
vosechu / gist:e48a29e286e03b4ea6b9
Created June 10, 2015 04:17
Games from my steam list
Simulation / World builders
* 1 Kerbal Space Program [Indie, Simulation, Early Access] - 891.0hrs
2 Gnomoria [Strategy, Indie, Simulation, Early Access] - 336.0hrs
15 Terraria [Action, Adventure, Indie, RPG] - 39.0hrs
19 Prison Architect [Early Access, Indie, Simulation, Strategy] - 30.0hrs
40 Starbound [Action, Adventure, Casual, Indie, RPG, Early Access] - 9.4hrs
RPG
jquery
1. Find things in HTML
2. Change things you found
3. Stuff remote things into other things (ajax)
4. Nothing else.
underscore
1. all the things js should have had from teh beginning
2. replaced with ES6
@vosechu
vosechu / views_tweaks.info
Created February 14, 2011 23:48
Functions and implementation of Views exposed range selector filter
name = Views Tweaks
description = Misc tweaks to Views
core = 6.x
dependencies[] = views
Starting in development mode..
127.0.0.1 - - [26/Oct/2011 21:00:04] "GET / HTTP/1.1" 200 1187 0.0014
127.0.0.1 - - [26/Oct/2011 21:00:04] "GET / HTTP/1.1" 200 1187 0.0387
127.0.0.1 - - [26/Oct/2011 21:00:04] "GET / HTTP/1.1" 200 1187 0.0020
!! Unexpected error while processing request: end of file reached
collection: new HoursCollection
initialize: (id) ->
_.bindAll this
if id
@model = CE.RestaurantsCollection.get(id)
if !@model
@model = new Restaurant
@vosechu
vosechu / id_rsa.pub
Created November 7, 2015 00:12
My public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0z4ZWwpLaW64MiJ+VQWpOSN7vGnxlxsczj8Di25iH9xcryfIz283kHm7jpEq5Ym+VDWG8XE4/DJxXyiDS8uoFmV/KhrdRb8hNXQn9iQvCo4j2MpU1rbyM3DIj4wAFgm8qhAmG3qlYuGv4A2YCl3hrN4CAvZIEwgD6nmFXHPjfFyhw40r53P8NyznOLWH+xgzKd73t/8C5M/xGypNO0ueFkAV0aSmg3gd8RitCQbe8TfPNsAdfR9/5HN+7HBJAtJZo67vVBkm+rRJoCrpftOvvb3vAoQao5r5lXHuoKq8NUAUsTgNBgFvSPOadUAr2SavGC9MwfpiKh74nmMC1hcX7Q== vosechu@gmail.com
@vosechu
vosechu / .zshrc
Last active December 12, 2015 10:19
My .zshrc file
alias out="cd ~/out/"
alias v="cd ~/out/vosechu"
alias vg="cd ~/out/vosechu/vosechu.github.com"
alias vw="cd ~/out/vosechu/warmup-exercises"
alias vp="cd ~/out/vosechu/portlandcodeschool"
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
@vosechu
vosechu / crypto.rb
Created February 17, 2013 19:22
Simple Crypto module for encrypting and decrypting strings using a secret token stored in application config. Useful for creating email tokens which contain some data about the user for retrieval.
module Crypto
def encrypt(string)
Base64.encode64(aes(Application.config.secret_token, string)).gsub /\s/, ''
end
def decrypt(string)
aes_decrypt(Application.config.secret_token, Base64.decode64(string.gsub(" ","+")))
end
def aes(key,string)
@vosechu
vosechu / scoping.js
Created February 17, 2013 19:12
Exploration of scoping, hoisting, and shadowing in javascript
// At all times you can use the debugger to break into the console in Chrome
debugger;
// Demonstration of Scoping
var global = "I'm alive!";
function() { // IIFE style function definition (note the parens at the end of the curly braces)
// Point 1: Does global exist here?
// If I define a variable here does it exist outside the IIFE?
var inner_variable = "I'm alive inside!"
@vosechu
vosechu / config.ru
Last active December 13, 2015 20:49
Simple contact form Rack middleware for use in middleman #pcs_code_example
# Modified version of TryStatic, from rack-contrib
# https://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/try_static.rb
# Serve static files under a `build` directory:
# - `/` will try to serve your `build/index.html` file
# - `/foo` will try to serve `build/foo` or `build/foo.html` in that order
# - missing files will try to serve build/404.html or a tiny default 404 page
use Rack::Reloader, 0
require './rack_emailer'