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 'httparty' | |
1.upto(916) {|x| File.open('./xkcd2/'+x.to_s+'.jpg','w') {|f| f.write(HTTParty.get('http://imgs.xkcd.com/comics/' + HTTParty.get('http://xkcd.com/'+x.to_s).body.match(/(?<=src\="http:\/\/imgs\.xkcd\.com\/comics\/).*?(?=")/).to_s))}} |
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
jQuery ($) -> | |
jQuery.fn.defaultValue = (text) -> | |
this.each -> | |
return if this.value != "" or this.value == text | |
this.value = text | |
jQuery(this).toggleClass "inactive" | |
$(this).focus -> | |
if this.value == text or this.value == "" | |
this.value = "" | |
jQuery(this).toggleClass "inactive" |
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
nav#top { | |
height: 38px; | |
width: 100%; | |
background: url(/assets/header.png); | |
border: 1px solid #000; | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
border-bottom-radius: 5px; | |
ul { | |
height: 100%; |
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
@mixin inheritance { | |
font-style: inherit; | |
line-height: inherit; | |
} | |
p { | |
font-size: $basefont -2; | |
font-weight: normal; | |
line-height: 18px; | |
margin-bottom: $baseline / 2; | |
small { |
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
(ns brain.fuck | |
(:gen-class)) | |
(def ptr (atom 0)) ; Initialize the pointer to 0 | |
(def cells (atom (vec (repeat 30000 0)))) ; Plenty of room! | |
(defn start [place commands] | |
(loop [brackets 1] | |
(when-not (== brackets 0) | |
(swap! place inc) |
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
(1..999).select { |x| (x % 3) == 0 || (x % 5) == 0 }.reduce(:+) |
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
brew update | |
brew install clojure | |
brew install leiningen |
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/sh | |
breakchars="(){}[],^%$#@\"\";:''|\\" | |
CLOJURE=$CLASSPATH:/usr/local/Cellar/clojure/1.3.0/clojure-1.3.0.jar:${PWD} | |
if [ "$#" -eq 0 ]; then | |
exec rlwrap --remember -c -b "$breakchars" \ | |
java -cp $CLOJURE clojure.main --repl | |
else | |
java -cp $CLOJURE clojure.main "$@" | |
fi |
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
package main | |
import ( | |
"strings" | |
"fmt" | |
) | |
var cells [30000]int | |
var commands []string | |
var ptr = 0 | |
var pos = 0 |
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
// Replace lines 119 and 120 in Game.java with the following code | |
// Also import java.io.File | |
screen = new Screen(WIDTH, HEIGHT, new SpriteSheet(ImageIO.read(new File("res/icons.png")))); | |
lightScreen = new Screen(WIDTH, HEIGHT, new SpriteSheet(ImageIO.read((new File("res/icons.png"))))); |
OlderNewer