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
* My solution | |
MAIN ENT1 0 | |
ENT2 3999 | |
ENTA 133 | |
STA 0,2 | |
DEC2 1 | |
CMP2 7(4:5) | |
JGE 3 | |
MOVE 9(9) | |
CON 9 |
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
require 'pp' | |
devs = %w{ Andrew Anthony Ben Matt Tom Zac } | |
devs << nil if devs.length.odd? | |
top, bottom = devs.each_slice(devs.length/2).to_a | |
pivot, *top = top | |
result = [] | |
(devs.length-1).times do | |
top.unshift(bottom.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
module Main where | |
import Data.List | |
data Coder = Coder String | |
| Nobody | |
deriving (Show) | |
data Pairings = Pair Coder Coder | |
| Pairs [Pairings] |
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
$(document).ready(function() { | |
$(document) | |
.on( | |
'ajax:before', | |
'form.single-line-qualification', | |
function(e) { | |
if (e.target[1].value.trim() === '') { | |
e.target[1].value = ''; | |
alert('You must enter a name!'); | |
return false; |
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
cd ~/Library/Fonts/ && curl -O http://web.nickshanks.com/downloads/fonts/Kedage.dfont |
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
settings = { | |
core = { | |
real_name = "Tom Miller"; | |
user_name = "tmiller"; | |
nick = "tmiller"; | |
}; | |
"fe-text" = { actlist_sort = "refnum"; }; | |
"perl/core/scripts" = { | |
growl_show_message_public = "yes"; | |
growl_show_message_action = "yes"; |
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
require 'socket' | |
require 'thread' | |
server = TCPServer.open(8080) | |
HEADER = <<-EOH | |
HTTP/1.1 200 OK | |
Content-Type: text/html; charset=ISO-8859-1 | |
EOH |
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
;; Packages | |
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
;; General | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(setq inhibit-startup-screen t) | |
(setq inhibit-startup-echo-area-message t) |
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
git status --porcelain | sort -u | sed -e 's/^.\(.\).*/\1/' -e 's/M/*/' -e 's/D/-/' -e 's/?/+/' | tr -d '\n' |
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
<% | |
def database_adapter | |
if Bundler.load.specs.map(&:name).include? "mysql2" | |
"mysql2" | |
else | |
"mysql" | |
end | |
end | |
def database_name(environment) |
OlderNewer