I hereby claim:
- I am cciollaro on github.
- I am cciollaro (https://keybase.io/cciollaro) on keybase.
- I have a public key whose fingerprint is C448 1E99 EA31 E6C2 3B84 F63D E9FA BDBF 991B DE13
To claim this, I am signing this object:
let's imagine you wanted to test Coin.js | |
1.) create test/coinTest.js | |
2.) write tests like these: http://pivotal.github.io/jasmine/. Jasmine is a really great library, go check out that page! :) | |
3.) when you've written your test, go to SpecRunner.html and include your test and dependencies like so: | |
<!-- include source files here... --> | |
<script type="text/javascript" src="js/Coin.js"></script> | |
<!-- include spec files here... --> | |
<script type="text/javascript" src="test/coinTest.js"></script> |
require 'digest' | |
input = ARGV.first || "chris" | |
lowest_digest = Digest::SHA512.hexdigest(input) | |
lowest_input = input | |
begin | |
loop do | |
digest = Digest::SHA512.hexdigest(input) | |
if digest < lowest_digest | |
lowest_digest = digest |
blocks = (0..8).to_a.shuffle | |
puts blocks.inspect | |
i = 0 | |
while i < 8 | |
until i == blocks[i] | |
j = blocks[i] | |
#swap blocks[i] with blocks[blocks[i]] | |
blocks[i], blocks[j] = blocks[j], blocks[i] | |
end |
class Array | |
alias :peek :last | |
end | |
trials = gets.to_i | |
trials.times do |x| | |
stack = [] | |
ctr = 0 | |
ptr = 0 | |
str = gets.chomp |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object: