Skip to content

Instantly share code, notes, and snippets.

View spilth's full-sized avatar
👽
spilth.org

Brian Kelly spilth

👽
spilth.org
View GitHub Profile
@spilth
spilth / rails-crash-course.md
Created September 18, 2012 22:53
Ruby on Rails Crash Course

Ruby on Rails Crash Course

This is a course meant to give you the basics of Ruby and Rails with the assumption that you'll use the resources provided below to further your learning.

It assumes you are familiar with basic programming concepts and the basics of object oriented programming.

Basics

Create a Ruby Script

A-Ha: Take On Me
Bad English: When I See You Smile
Big Country: In a Big Country (Radio Edit)
Bonnie Tyler: Total Eclipse of the Heart (Single Version)
Boston: More Than a Feeling
The Cars: Let's Go
The Cars: You Might Think
The Cars: Drive
The Cars: Just What I Needed
Chicago: If You Leave Me Now
@spilth
spilth / energized-programmer.md
Created January 2, 2013 20:47
Brainstormed outline for a book about energized programming

The Energized Programmer

Passion

Check Yourself

Passion vs. Zeal

Your Team

@spilth
spilth / ruby-rails-resources.md
Last active December 1, 2016 12:40
A collection of useful reference and learning resources for Ruby and Rails.
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
module Liquid
class RubyBlock < Liquid::Block
def initialize(name, markup, tokens)
super
@code = @nodelist[0].to_s.gsub(/^$\n/, '')
File.open('/tmp/ruby-foo.rb', 'w') {|f| f.write("#{@code}")}
@result = `ruby /tmp/ruby-foo.rb`
end
  • asynchronous
  • canonical
  • closure
  • deterministic
  • federated
  • horizontal scaling
  • idempotent
  • idiomatic
  • inner function
  • latency
@spilth
spilth / gist:5457184
Last active May 8, 2016 11:33
Get the width and height (in pixels) of the loaded Tiled map in libgdx.
map = new TmxMapLoader().load("test16.tmx");
TiledMapTileLayer mainLayer = (TiledMapTileLayer) map.getLayers().get(0);
tileSize = (int) mainLayer.getTileWidth();
mapWidth = mainLayer.getWidth() * tileSize;
mapHeight = mainLayer.getHeight() * tileSize;
@spilth
spilth / command-line.md
Last active January 2, 2017 05:47
Tutorial on common command-line & shell concepts

The Command Line

Shells

  • UNIX Shells
    • bash
    • tcsh
    • zsh
    • ksh
  • Windows