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
function query(xpath, callback){ | |
var results = document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); | |
for ( var i=0 ; i < results.snapshotLength; i++ ) { | |
if(callback){ | |
callback(results.snapshotItem(i)) | |
} | |
} | |
} |
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 'ruboto' | |
ANDROID_HOME = ENV["ANDROID_HOME"] | |
android_jar = Dir["#{ANDROID_HOME.gsub("\\", '/')}/platforms/*/android.jar"][0] | |
android_jar.gsub!(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) | |
class_path = ['.', "#{Ruboto::ASSETS}/libs/dx.jar","../libs/jruby-complete-1.7.10.jar", "../libs/mapdb.jar"].join(File::PATH_SEPARATOR).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) | |
cmd = "javac -source 1.6 -target 1.6 -cp #{class_path} -bootclasspath #{android_jar} -d . org/jruby/ext/dbm/*.java" | |
puts cmd | |
system(cmd) | |
`jar cvfe dbm.jar RubyDBM org/jruby/ext/dbm/*.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
files.split("\n").each{|s| gem, version = s.split; version = version[1..-2]; puts "gem install #{gem} -v #{version}" ;`gem install #{gem} -v #{version}`; } |
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 SimpleIntentService < Java::AndroidApp::IntentService | |
def onHandleIntent(intent) | |
android.util.Log.v 'Punch', "Handling intent" | |
sleep 5 | |
end | |
end | |
class QuickStartActivity | |
def onCreate(bundle) | |
msgIntent = android.content.Intent.new(self, android.app.IntentService) |
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
# Colout Dwarf Fortress theme for Solarized terminals | |
# First install colout, go to https://github.com/nojhan/colout | |
# | |
# mkdir ~/.colout | |
# cp colout_df.py ~/.colout/ | |
# tail -0f df/gamelog.txt | colout -T ~/.colout -t df | |
# | |
# I just started this for my own sake, please do add your own colors, regexes and stuff. | |
# By Stefan Midjich |
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
DFHack::color_ostream_wrapper * df_network_out = new DFHack::color_ostream_wrapper(std::cout); | |
DFHack::RemoteClient * network_client = new DFHack::RemoteClient(df_network_out); | |
std::cout << network_client->connect() << "\n"; | |
std::cout << network_client->suspend_game() << "\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
# if your db is currently up to date, just run make setup to touch all the files. otherwise start the db from scratch | |
MIGRATIONS = $(shell ls db/migrate) | |
RUN_FILES = $(addprefix db/run/,$(MIGRATIONS)) | |
all: db/run release | |
release: | |
$(MAKE) migrate | |
$(MAKE) db/run/tests_updated | |
db/run: |
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 | |
require 'json' | |
require 'open-uri' | |
user = ENV['circleci_user'] | |
project = ENV['circleci_project'] | |
token = ENV['circleci_token'] | |
unless user && project && token | |
puts "Need Circle CI user, project and token. Use the environment variables circleci_user, circleci_project, and circleci_token" |
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 'spec_helper' | |
describe QuickbooksEmployee do | |
it "hey" do | |
raise "hye" | |
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
gcc -g -o commit-tree commit-tree.o read-cache.o -lssl | |
/usr/bin/ld: read-cache.o: undefined /reference to usrsymbol '/binSHA1_Update@/ld@OPENSSL_1.0.0: ' | |
/read-/usr/cache.o:lib/x86_64 undefined-linux- referencegnu/libcrypto.so.1.0.0 to: error symbol adding 'symbols: SHA1_Update@DSO missing@OPENSSL_1.0.0 from ' | |
//command/ usrlineusr | |
//libbin//x86_64ld:-linux read-gnu-cache.o/libcrypto.so.1.0.0: undefined: reference to /symbol error 'SHA1_Updateaddingcollect2: error: ld returned 1 exit status | |
usr/bin/ @symbols:@OPENSSL_1.0.0 DSO' | |
missing //usrld: /libfrom /x86_64-command linelinux-read-gnu/cache.o:libcrypto.so.1.0.0 | |
: error adding symbolsundefined : reference DSO missingto symbol from ' commandSHA1_Update@ line@OPENSSL_1.0.0 | |
' | |
//usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line |
OlderNewer