Skip to content

Instantly share code, notes, and snippets.

View luketlancaster's full-sized avatar
🤷‍♂️
🤷🏻‍♂️

Luke Lancaster luketlancaster

🤷‍♂️
🤷🏻‍♂️
View GitHub Profile
@luketlancaster
luketlancaster / game.js
Last active August 29, 2015 14:13 — forked from sscotth/game.js
function Game(numberOfPlayers){
this.weapons = [];
this.weapons.push(new Weapon({name: 'Sword', damage: 0.2, ammo: Infinity}));
this.weapons.push(new Weapon({name: 'Shotgun', damage: 0.6, ammo: 1}));
this.weapons.push(new Weapon({name: 'Fist', damage: 0.05, ammo: Infinity}));
this.players = [];
for (var i=0; i < numberOfPlayers; i++){
var player = new Player;
@luketlancaster
luketlancaster / bashprofile
Created January 24, 2015 18:56
Bash Profile for MBP
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias ll='ls -l'
alias ~='cd ~'
alias b='cd ..'
#############################################################################
# https://github.com/github/gitignore/blob/master/Global/Archives.gitignore #
#############################################################################
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
puts "Hello, What's your name?"
name = gets.chomp.upcase
# Loop through each letter in their name and grammar it.
for letter in name.split("") do
if letter == "A" or letter == "E" or letter == "F" or letter == "H" or letter == "I" or letter == "L" or letter == "M" or letter == "N" or letter == "O" or letter == "R" or letter == "S" or letter == "X"
article = "an"
else
article = "a"
end
puts "Give me "+ article + "... " + letter + "!"
@luketlancaster
luketlancaster / fizzbuzz.cpp
Created July 11, 2015 20:33
FizzBuzz c++
int a = 0;
void setup() {
Serial.begin(9600);
Serial.println("FizzBuzz:");
}
void loop() {
if (a % 15 == 0)
@luketlancaster
luketlancaster / battleship.py
Last active September 15, 2015 21:58
Battleship game made through CodeAcademy
from random import randint
board = []
for x in range(5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print " ".join(row)
defmodule Support.Router do
use Support.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :assign_current_user

Eternal God, creator and redeemer, from whom comes every good and perfect gift, fill Jess and Luke with the riches of your grace and breathe into their marriage the strength of your holy and life-giving Spirit.

Send upon them the gift of love that puts no limit to its faith and forbearance.

@luketlancaster
luketlancaster / fibb.rb
Created November 3, 2015 18:49
Fibonacci method
index = ARGV[0].to_i
def fibb(times)
start = [0]
times.times do |x|
if x.zero?
start << 1
else
start << start[x -1] + start[x]
end
end
2016-08-16T18:16:59.014617+00:00 heroku[api]: Starting process with command `lita` by luketlancaster@gmail.com
2016-08-16T18:17:01.484377+00:00 heroku[run.4784]: Awaiting client
2016-08-16T18:17:01.519315+00:00 heroku[run.4784]: Starting process with command `lita`
2016-08-16T18:17:01.598283+00:00 heroku[run.4784]: State changed from starting to up
2016-08-16T18:17:04.981507+00:00 heroku[run.4784]: Process exited with status 1
2016-08-16T18:17:04.988891+00:00 heroku[run.4784]: State changed from up to complete
2016-08-16T18:18:38.922944+00:00 heroku[router]: at=error code=H99 desc="Platform error" method=GET path="/" host=lancaster-lita.herokuapp.com request_id=a5cc52fa-0daa-48b2-9480-13f0cf231bf5 fwd="69.245.25.217" dyno= connect= service= status=503 bytes=
2016-08-16T18:19:38.037729+00:00 heroku[router]: at=error code=H99 desc="Platform error" method=GET path="/" host=lancaster-lita.herokuapp.com request_id=0b8e95c1-197d-4eb1-9685-d3d40a1f0e24 fwd="69.245.25.217" dyno= connect= service= status=503 bytes=
20