#Crepes
##Ingredients Original recipe makes 8 crepes
- 1 cup all-purpose flour
- 2 eggs
- 1/2 cup milk
- 1/2 cup water
- 1/4 teaspoon salt
- 2 tablespoons butter, melted
| # Jruby example using the chemistry development kit(CDK) to parse smiles strings into a | |
| # canonical format | |
| # author : Dana klassen | |
| require 'rubygems' | |
| include Java | |
| # $CLASSPATH << File.join(File.expand_path(File.dirname(__FILE__)),"lib") | |
| Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)),"lib/*.jar")) { |file| require file } | |
| import 'org.openscience.cdk.smiles.SmilesParser' |
| # Example using the Chemistry Development Kit to generate a molecular fingerprint of two chemicals | |
| # we then compare those chemicals using their tanimoto score. | |
| # author :: Dana Klassen | |
| # credit :: credit goes to http://depth-first.com/articles/2006/11/22/scripting-molecular-fingerprints-with-ruby-cdk/ | |
| # example generating a molecular finger print from an input SMILES string | |
| ENV['CLASSPATH'] = File.join(File.expand_path(File.dirname(__FILE__)),"/jar/cdk-1.4.16.jar") | |
| require 'rubygems' | |
| require 'rjb' |
| # Mining on a mac? Enter the command below into the terminal | |
| curl -o pooler-cpuminer-2.3.2-osx64.zip http://softlayer-ams.dl.sourceforge.net/project/cpuminer/pooler-cpuminer-2.3.2-osx64.zip && unzip pooler-cpuminer-2.3.2-osx64.zip && chmod +x minerd ./minerd --algo=scrypt --url=stratum+tcp://pool.teamdoge.com:3333 --userpass=DataEng.Custom:trRYp2bcZpfE8Q |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
#Crepes
##Ingredients Original recipe makes 8 crepes
| #!/bin/bash | |
| set -x # verbosity | |
| # This script is meant to be run from inside alchemy linux, our PXE rescue system. | |
| # To boot into alchemy, connect to a serial console with ipmitool sol activate, and set the bootdev with 'chassis bootdev pxe' | |
| # The default user:pass is alchemy:transmute | |
| # This script covers swapping out the OS drive of a hadoop node, and is very coupled to this task. The individual sections however may be reused. | |
| # This script should never be run without being watched, and should never be run all at once. Run each section on its own. Ye be warned. | |
ls -l /dev/disk/by-uuid
for i in /dev/sd{a..m}; do result=$(sudo smartctl -a $i | grep Serial\ Number); echo "$i : $result"; done
awk '/UUID/ {split($1,a,"=");print a[2];}' /etc/fstab awk '/(^|#\s+)UUID/ {split($1,a,"="); print a[2]; }' /etc/fstab
/dev/disk/by-uuid/{{insert uuid here}}
| ls -1 /etc/sv | grep sql | xargs -I@ sv start @ | |
| sudo swapoff -a | |
| sudo swapon -a |