This file contains 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
// I used to write like this | |
int foo(int herp, int derp) | |
{ | |
if(herp > derp) | |
{ | |
bar(); | |
} | |
} |
This file contains 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
<?php | |
// Get team ID from url | |
$teamID = $_GET["team"]; | |
// - SQL Queries | |
// Get university and team name | |
$query = "SELECT * FROM `delegations` WHERE delegID = " . $teamID; |
This file contains 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
infile = ARGV[0] | |
@gridsize = ARGV[1].to_i | |
@world = Array.new(@gridsize+2){|i| Array.new(@gridsize+2){"."}} | |
File.open(infile, "r") do |f| | |
(1..@gridsize).each do |i| | |
row = f.gets | |
rowarr = row.split(" ") |
This file contains 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
<<<<<<< HEAD | |
======= | |
>>>>>>> payroll |
This file contains 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
class Chocolate | |
def white?; ...; end; | |
def caffeinated?; ...; end; | |
def imported?; ...; end; | |
end | |
#main script |
This file contains 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
var foo = { | |
bar: 3, | |
baz: function(){ /* a function body */} | |
} | |
foo.quxx = function(){ /* a function body */} |
This file contains 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
############# THIS IS WITHIN THE LIBRARY ############# | |
class Foo | |
def initialize(a, b, c, opts={}) | |
#do some stuff | |
end | |
end | |
###################################################### |
This file contains 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
#!/bin/bash | |
function f() { | |
sleep "$1" | |
echo "$1" | |
} | |
while [ -n "$1" ] | |
do | |
f "$1" & | |
shift |
This file contains 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
class GenericController < ApplicationController | |
end | |
class SpecificController < GenericController | |
end |
This file contains 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
#!/usr/bin/env ruby | |
result = `grep -rls "debugger" *` | |
results = result.split("\n").reject{ |res| res =~ /\.log\s*$/ || res =~ /^\s*$/} | |
if results.length > 0 | |
puts "NEVER DO THIS AGAIN. THERE ARE DEBUG STATEMENTS IN THE CODEBASE" | |
puts "offending files:" | |
results.each do |r| | |
puts " #{r}" | |
end |