The real, full repository for this game is at https://github.com/roryokane/pegs-in-puzzlescript.
This Gist is just used by http://www.puzzlescript.net/play.html?p=87985a8a36b10c3ec386 to load the game in your browser.
The real, full repository for this game is at https://github.com/roryokane/pegs-in-puzzlescript.
This Gist is just used by http://www.puzzlescript.net/play.html?p=87985a8a36b10c3ec386 to load the game in your browser.
javascript: (function () { | |
var n = null, | |
C = false; | |
function h(m) { | |
d(m, "jsgif_overlaid"); | |
m.removeEventListener("click", i, C) | |
} | |
function i(m) { | |
var o = this; |
uri 'contacts', name: 'contacts' do | |
get 'contacts#index' | |
end | |
uri 'contacts/:id/addresses', name: 'contact_addresses' do | |
put 'contact_addresses#replace' | |
post 'contact_addresses#create' | |
delete 'contact_addresses#delete' | |
end |
# --------------------------- | |
# Sensical Sentence Scrambler | |
# --------------------------- | |
# This short program takes any word longer than three characters and randomly shuffles all the characters | |
# except for the first and the last. Strangely enough, sentences are still quite readable like this. | |
# **Usage** | |
# Save the file on your computer as 'scramble.rb'. | |
# From the command line, run `ruby scramble.rb "Here's my sentence."`, and it should output |
import scala.collection.mutable.ArrayBuffer | |
object Runner { | |
def main(args: Array[String]) { | |
// printFizzBuzz(20) | |
val max = 20 | |
val factorsAndWords = Map(3 -> "Fizz", 5 -> "Buzz") | |
printGenericFizzBuzz(max, factorsAndWords) | |
} |
#encoding: utf-8 | |
# http://news.ycombinator.com/item?id=4086325 | |
# … try to generate a table of how likely it was to get various dice rolls when you rolled 4 6-sided dice and took the top 3. | |
require 'pp' | |
def dice_roll(sides) | |
rand(sides) + 1 |
require './main-tester' | |
puts "done in caller" |
sudo apt-get install -y openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion g++ openjdk-6-jre-headless |
#!/usr/bin/env bundle exec ruby | |
puts "hello" |
# encoding: utf-8 | |
class Hash | |
def with_new_default(*hash_new_args, &hash_new_block) | |
empty_defaulting_hash = Hash.new(*hash_new_args, &hash_new_block) | |
# using #merge; #replace would also replace the default value | |
return empty_defaulting_hash.merge(self) | |
end | |