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(window){ | |
function sum_peaked_array(peaked_array){ | |
var lowest_array_peak, sum = 0; | |
lowest_array_peak = Math.min(peaked_array[0],peaked_array[peaked_array.length-1]); | |
for(var i=1; i<peaked_array.length-1; i+=1){ | |
sum += lowest_array_peak - peaked_array[i]; | |
} | |
return sum; |
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
sha2supported([{"supported":true}]); |
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
{ | |
responseText: "yes"; | |
} |
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 showAllPermutations(mixyString){ | |
var unMixy, permutations = []; | |
popAndLock = function(string, root){ | |
var i; | |
if(root == null){ | |
root = "" | |
} | |
for(i=0; i<string.length; i+=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
#!/bin/bash | |
n=1 | |
while (( $n <= 100 )) | |
do | |
bundle exec ruby -I test test/integration/timesheet/mobile_test.rb -n test_start_stop_timer_then_delete_timer | |
n=$(( n+1 )) | |
done |
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 window.console and typeof(window.console.time) is "undefined" | |
console.timeKey = (name) -> | |
return unless name | |
"KEY:" + name.toString() | |
console.time = (name, reset=false) -> | |
console.timeCounters ||= {} | |
return unless key = console.timeKey(name) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SetTimeout + Computer Sleep Demo</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var now = new Date(); | |
var timeout = 10000; |
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
var five = require("johnny-five"), | |
board, servo, piezo; | |
board = new five.Board(); | |
board.on("ready", function() { | |
piezo = new five.Piezo(9); | |
board.repl.inject({ |
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 fill_out_grid | |
constructor: (people_list, @target_el) -> | |
people_list += ", #{people_list}" | |
@people = people_list.split(", ") | |
@table = "" | |
this.shuffle() | |
data = this.table_data() | |
@target_el.find("tbody").html(data.join("")) |