Skip to content

Instantly share code, notes, and snippets.

View burtlo's full-sized avatar

Lynn Frank burtlo

View GitHub Profile
@burtlo
burtlo / default.rb
Last active August 29, 2015 14:24
Refactored IIS
powershell_script "Install IIS" do
code "add-windowsfeature Web-Server"
action :run
end
service "w3svc" do
action [ :enable, :start ]
end
powershell_script "disable default site" do
@burtlo
burtlo / custom.erb
Last active August 29, 2015 14:24
Apache Cookbook Updated
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
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
@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.

@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 / !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 / 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 / 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 / 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 / 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):

*...
....
.*..
....