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
# If you see this: | |
$ go get github.com/robfig/revel | |
package code.google.com/p/go.net/websocket | |
imports github.com/robfig/pathtree | |
imports github.com/streadway/simpleuuid | |
imports net/http/cookiejar: unrecognized import path "net/http/cookiejar" | |
# You need to upgrade to go version 1.1 |
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
# If you get the following, the solution is to try compiling under Java 1.6 | |
# $ JAVA_HOME=`/usr/libexec/java_home -v 1.6` rvm install jruby-head | |
compile-jruby: | |
[javac] Compiling 1395 source files to /Users/jackdanger/.rvm/src/jruby-head/build/classes/jruby | |
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 | |
[javac] /Users/jackdanger/.rvm/src/jruby-head/src/org/jruby/javasupport/JavaClass.java:1418: error: cannot find symbol | |
[javac] return getRuntime().newBoolean(javaClass().isAnnotationPresent(((JavaClass)annoClass).javaClass())); | |
[javac] ^ | |
[javac] symbol: method isAnnotationPresent(Class) |
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 odd(list) | |
list.each_with_index do |item, index| | |
yield item if index % 2 == 0 | |
end | |
end | |
def even(list) | |
list.each_with_index do |item, index| | |
yield item if index % 2 == 1 | |
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
projects=`locate Gemfile.lock | egrep -v "(.rvm|bundler|.passenger)" | xargs egrep " rails" | cut -d : -f 1 | uniq | xargs egrep -L 'rails \((2.3.15|3.0.19|3.1.10|3.2.11)\)' |cut -d : -f 1 | xargs -n 1 dirname` | |
for project in $projects; do | |
echo '-----------------' | |
echo '-- PATCHING' $project ' -- ' | |
echo '-----------------' | |
cd $project | |
git stash | |
git checkout master | |
git pull | |
sed -i .bak "s/gem [\"|']rails[\"|'], [\"|']2.*[\"|']/gem 'rails', '2.3.15'/g" Gemfile |
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
printf("%c\n", 14) | |
printf("%c ", 0x6A) # ┘ | |
printf("%c ", 0x6B) # ┐ | |
printf("%c ", 0x6C) # ┌ | |
printf("%c ", 0x6D) # └ | |
printf("%c ", 0x6E) # ┼ | |
printf("%c ", 0x71) # ─ | |
printf("%c ", 0x74) # ├ | |
printf("%c ", 0x75) # ┤ | |
printf("%c ", 0x76) # ┴ |
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
Actual dialogue between two characters in MI-5 Volume 9 Episode 1 | |
Boss: You crack the code? | |
"Techie": Not exactly. Each message between Habib and Talwar has a different dynamic signature. | |
I have to trawl the non-indexed deep web to construct a cipher. It requires a lot of | |
computing power; takes time. | |
Boss: And you're waiting for...? |
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 crawler.crawler | |
(:gen-class) | |
(:require [net.cgrand.enlive-html :as html] | |
org.bovinegenius.exploding-fish)) | |
(def crawled (atom #{})) | |
(defn fetch | |
"Retrieve contents of a page at a given url" |
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 palindrome | |
(:use clojure.test)) | |
(with-test | |
(defn is-palindrome? | |
"is true if the given argument is a palindrome" | |
[string] | |
(loop [string string] | |
(cond | |
(= \space (first string)) |
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
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url=/wordpress/" /></head><body></body></html> |