This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a = 0; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("FizzBuzz:"); | |
} | |
void loop() { | |
if (a % 15 == 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + "!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################# | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ..' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
NewerOlder