Skip to content

Instantly share code, notes, and snippets.

View stevekinney's full-sized avatar

Steve Kinney stevekinney

View GitHub Profile

Fundamental SQL: Hands On

Getting Started

Create a folder. sql_intro works if you're at a loss for something better.

Fire up SQLite: sqlite3 example.sqlite3

Let's create a new table.

@stevekinney
stevekinney / ruby-resources.md
Created August 28, 2014 13:38
Ruby Learning Resources

Learn to Program

This is a great introductory book. It's really the only "traditional" book I am recommending at this stage in the game. It's a bit old, but it's free to read online.

Try Ruby

Try Ruby is an interactive tour of Ruby. It gives you a command prompt like the one we were fucking around with yesterday and takes your through some of the basic functionality of Ruby. It takes about 20 minutes and it's totally worth it. Don't worry about remembering everything and feel free to do it again in a few weeks.

Learn Ruby the Hard Way

@stevekinney
stevekinney / method_missing.js
Last active February 27, 2020 08:11
Ruby's `method_missing` implemented in JavaScript using ES6 proxies.
// This will only work in environments that support ES6 Proxies.
// As of right now, that's pretty much only Firefox.
function Refrigerator(foods) {
this.foods = foods;
return new Proxy(this, {
get: function (receiver, name) {
if (name in receiver) {

Environment Setup

  • Homebrew
    • OS X Command Line Development Tools
  • Git brew install git
  • RVM
  • Ruby (via RVM)
  • Atom
  • Seeing is Believing
  • Pry
# Not Good
def show
  @order = Orders.find(params[:id])
end

# Good:
#@user is the logged on user.
def show
 @order = @user.orders.find(params[:id])
@stevekinney
stevekinney / free.txt
Created September 22, 2014 17:11
Memory Leak Issue Diagnostic
total used free shared buffers cached
Mem: 2002 1924 78 0 8 27
-/+ buffers/cache: 1888 113
Swap: 0 0 0
Total: 2002 1924 78
@stevekinney
stevekinney / .vimrc
Last active August 29, 2015 14:07
.vimrc (September 29, 2014)
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" Vim Plugins via Vundle
{
"id": 1,
"username": "alanturing",
"firstName": "Alan",
"lastName": "Turing",
"location": "London, UK",
"fields": [
"mathematics",
"cryptanalysis",
"computer science",
#!/usr/bin/env bash
#
# Based on 'bobby' theme with the addition of virtualenv_prompt
#
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${green}✓"
SCM_THEME_PROMPT_PREFIX="${yellow}|${cyan}"
SCM_THEME_PROMPT_SUFFIX="${yellow}| "

the sun did not shine. it was too wet to play. so we sat in the house all that cold, cold, wet day.

i sat there with sally. we sat there, we two. and i said, 'how i wish we had something to do!'