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
`go run echo_wrapper.go echo_worker.go TESTING` # => [TESTING] |
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
# RQ | |
redis 127.0.0.1:6379> TYPE rq:queue:default | |
list | |
redis 127.0.0.1:6379> RPOP rq:queue:default | |
"3662e57b-0188-4b78-982c-6904058242d8" | |
redis 127.0.0.1:6379> TYPE rq:job:3662e57b-0188-4b78-982c-6904058242d8 | |
hash | |
redis 127.0.0.1:6379> HGETALL rq:job:3662e57b-0188-4b78-982c-6904058242d8 | |
1) "created_at" | |
2) "2013-09-16T17:18:16.400954+00:00" |
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
package main | |
import ( | |
"log" | |
"time" | |
) | |
func main() { | |
ch := make(chan int) | |
go func() { |
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/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
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
git bisect start HEAD origin -- | |
bundle exec script/server | |
[ 200 -eq $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:3000) ] && git bisect good || git bisect bad |
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
__kernel void matdot(__global double * outputC, int widthA, int heightA, int widthB, int heightB, __global double* inputA, __global double* inputB) { | |
int column = get_global_id(0); | |
int row = get_global_id(1); | |
double sum = 0.0; | |
for (int i = 0; i < widthA; i++) { | |
sum += inputA[row * widthA + i] * inputB[i * widthB + column]; | |
} | |
outputC[row * widthB + column] = 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
#include <Servo.h> | |
Servo servo; | |
const int analogPin = 0; | |
const int servoPin = 9; | |
// The minimum pulse width corresponding to 0-degrees on the servo. | |
// Default is 544. |
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
void setup() { | |
Serial.begin(9600); | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); | |
Serial.println("Y for on, N for off."); | |
} | |
int ledOn = 0; | |
void loop() { |
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(){var global = this;function debug(){return debug};function require(p, parent){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '" from ' + parent); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports, mod, mod.exports, require.relative(path), global); } return mod.exports;}require.modules = {};require.resolve = function(path){ var orig = path , reg = path + '.js' , index = path + '/index.js'; return require.modules[reg] && reg || require.modules[index] && index || orig;};require.register = function(path, fn){ require.modules[path] = fn;};require.relative = function(parent) { return function(p){ if ('debug' == p) return debug; if ('.' != p.charAt(0)) return require(p); var path = parent.split('/') , segs = p.split('/'); path.pop(); for (var i = 0; i < segs.length; i++) { var seg = segs[i]; if ('..' == seg) path.pop(); else if ('.' != seg) path.push(seg); } return require(path.join('/'), parent); };};require.register("neuralnet |
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(localStorage.documents.indexOf("news-website-demo") === -1) { localStorage.documents += ",news-website-demo" } | |
localStorage.setItem('documents-news-website-demo', "{\"mockups\":[{\"top\":19,\"left\":23,\"z_index\":0,\"tool\":\"rectangle\",\"width\":851,\"height\":26,\"color\":\"#dedede\",\"border\":true},{\"top\":17,\"left\":29,\"z_index\":0,\"tool\":\"heading\",\"text\":\"News Website\",\"size\":\"25\",\"color\":\"black\"},{\"top\":22,\"left\":213,\"z_index\":0,\"tool\":\"label\",\"text\":\"New\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":72,\"left\":81,\"z_index\":0,\"tool\":\"paragraph\",\"text\":\"Open source localStorage based mockup tool\",\"width\":596,\"background\":\"#dedede\"},{\"top\":23,\"left\":258,\"z_index\":0,\"tool\":\"label\",\"text\":\"Threads\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":24,\"left\":330,\"z_index\":0,\"tool\":\"label\",\"text\":\"Comments\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":24,\"left\":419,\"z_index\":0,\"tool\":\"label\",\"text\":\"Ask\",\"size\ |