Skip to content

Instantly share code, notes, and snippets.

View burtlo's full-sized avatar

Lynn Frank burtlo

View GitHub Profile
require 'ruby-processing'
class Board
def positions
@positions ||= [ [], [], [] ]
end
def at(x,y)
positions[x][y]
@burtlo
burtlo / sample_entry.markdown
Created October 16, 2013 21:13
Developers are using Octopress to deliver information to other developers. It is important that we consider those other developers when creating our content and how that content is displayed. Defining a custom liquid tag helps you represent your content in a way that is easy to understand. The following gist contains all the content you need to …

To get started with Rails we need to install the gem. From the terminal type:

{% terminal %}
$ gem install rails
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.3.6.gem (100%)
Fetching: activesupport-3.2.8.gem (100%)
...
{% endterminal %}
@burtlo
burtlo / exercise.md
Last active December 26, 2015 22:39
Minesweeper Exercise

Kata: Minesweeper 47

Have you ever played Minesweeper? It’s a cute little game which comes within a certain Operating System whose name we can’t really remember. Well, the goal of the game is to find all the mines within an MxN field. To help you, the game shows a number in a square which tells you how many mines there are adjacent to that square. For instance, take the following 4x4 field with 2 mines (which are represented by an * character):

*...
....
.*..
....
@burtlo
burtlo / tree.rb
Last active December 27, 2015 00:19
Nokogiri Happymapper - Assignment of Parent Element
require 'happymapper'
class Branch
include HappyMapper
attr_accessor :tree
end
class Tree
include HappyMapper
@burtlo
burtlo / universal_framework.rb
Created November 15, 2013 23:04
Universal Framework with Xcoder
project = Xcode.project 'TestProject'
project.create_target 'Library', :bundle do |target|
target.create_build_phase :sources do |source|
source.add_build_file project.file('TestProject/AppDelegate.m')
end
target.create_build_phase :copy_headers do |headers|
headers.add_build_file_with_public_privacy project.file('TestProject/AppDelegate.h')
@burtlo
burtlo / presentation.md
Created November 19, 2013 02:25
Ruby as a Second Language

!SLIDE title

Ruby

as a second language

!SLIDE center

Stolkholm Syndrome

!SLIDE title

@burtlo
burtlo / !result.md
Last active December 29, 2015 06:39

The Problem

I wanted to use a background gradient to represent the types of a Pokémon. There are 18 possible Pokémon types. Pokémon can have one type and some have two types. This leads to roughly 324 combinations (When a Pokémon is one type I simply double that type) or 171 combinations (18 as a triangular number) if I order the types.

The Result

Static Image: Pokemon Types Live: http://attackdex.herokuapp.com/

The Method

@burtlo
burtlo / CursorScript.cs
Last active December 30, 2015 13:39
Exploring some C# in Unity. Reading through and implementing one of the recipes found in Unity 4.x Cookbook, http://www.packtpub.com/unity-4-x-cookbook/book.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class CursorScript : MonoBehaviour {
public Texture2D iconArrow;
public Vector2 arrowRegPoint;
public Texture2D iconZoom;
@burtlo
burtlo / language_mentoring.md
Last active August 29, 2015 14:05
Language Mentoring

Language Mentoring

Format

I will write a small passage about a subject written in my language. I will share it with you. We will both translate the passage into your language.

We will share our translated passages. We will talk about corrections, make clarifications, and discuss language concepts.

I will create and share an audio recording of the passage I wrote. You will create and share an audio recording of the translated passage.

describe String do
it "responds to #to_s" do
expect("").to respond_to(:to_s)
end
it "responds to the correct methods" do
[ :to_s, :to_i, :to_f ].each do |method|
expect("").to respond_to(method)
end