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
/* | |
A neuron is basically the sum of its synapses. | |
Along with a trigger threshold, that's all we need to calculate | |
whether or not it will trigger at any given moment: | |
*/ | |
const neuron = ({ synapses = [], threshold = 1 } = {}) => ({ | |
synapses, | |
threshold | |
}); |
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
[ | |
{ | |
"_id": "Gmail-Dashboard", | |
"_type": "dashboard", | |
"_source": { | |
"title": "Gmail Dashboard", | |
"hits": 0, | |
"description": "", | |
"panelsJSON": "[{\"col\":1,\"id\":\"Top-10-Worst-senders\",\"row\":4,\"size_x\":2,\"size_y\":5,\"type\":\"visualization\"},{\"col\":3,\"id\":\"Emails-Date-Histogram\",\"row\":1,\"size_x\":10,\"size_y\":3,\"type\":\"visualization\"},{\"col\":3,\"id\":\"Top-10-Senders\",\"row\":4,\"size_x\":2,\"size_y\":5,\"type\":\"visualization\"},{\"col\":1,\"id\":\"Total-Messages\",\"row\":1,\"size_x\":2,\"size_y\":3,\"type\":\"visualization\"},{\"col\":10,\"id\":\"Day-Of-Week\",\"row\":4,\"size_x\":3,\"size_y\":5,\"type\":\"visualization\"},{\"id\":\"Hour-Of-Day\",\"type\":\"visualization\",\"size_x\":5,\"size_y\":5,\"col\":5,\"row\":4}]", | |
"version": 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 | |
url=$1 | |
echo "Parsing: $url" | |
id=$(curl -s $url | ggrep -Po '\/\Khttp\:\/\/.*'| cut -c52-69) | |
echo "id=$id" | |
img_url="http://www.icarenewlife.com/articles/image/default/"$id"jpg" | |
mp3_url="http://www.icarenewlife.com/share/audio/"$id"mp3" |
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
Host bitbucket.org | |
Hostname bitbucket.org | |
Port 22 | |
User git | |
ProxyCommand nc -x localhost:7070 %h %p |
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 util = require('util'); | |
var events = require('events'); | |
var redis = require('redis'); | |
var RedisQueueConsumer = function (port, host) { | |
events.EventEmitter.call(this); | |
this.port = port || 6379; | |
this.host = host || '127.0.0.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
var gulp = require('gulp'); | |
var gulpif = require('gulp-if'); | |
var sprite = require('css-sprite').stream; | |
var base = require('gulp-base64'); | |
// generate sprite.png and _sprite.scss | |
gulp.task('sprites', function () { | |
return gulp.src('img/*.png') | |
.pipe(sprite({ | |
name: 'tx.png', |
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 [ `builtin type -p gsed` ]; then | |
gsed -i 's/fonts.googleapis.com/fonts.useso.com/g' templates/head.tmpl | |
gsed -i 's/ajax.googleapis.com/ajax.useso.com/g' templates/head.tmpl | |
gsed -i 's/fonts.googleapis.com/fonts.useso.com/g' static/third_party/flatly/bootstrap.min.css | |
else | |
sed -i 's/fonts.googleapis.com/fonts.useso.com/g' templates/head.tmpl | |
sed -i 's/ajax.googleapis.com/ajax.useso.com/g' templates/head.tmpl | |
sed -i 's/fonts.googleapis.com/fonts.useso.com/g' static/third_party/flatly/bootstrap.min.css | |
fi |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Switch Input Source</name> | |
<appendix>Use the right Option key to select the next input source</appendix> | |
<identifier>private.switch_input_source_with_right_option</identifier> | |
<autogen>--KeyToKey-- KeyCode::OPTION_R, KeyCode::SPACE, ModifierFlag::OPTION_L</autogen> | |
</item> | |
<item> |
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
108.160.166.62 dropbox.com | |
108.160.166.62 www.dropbox.com | |
108.160.166.140 client-lb.dropbox.com | |
107.20.134.222 dl.dropbox.com | |
107.20.134.222 dl-web.dropbox.com | |
23.21.206.219 forums.dropbox.com | |
108.160.165.211 notify0.dropbox.com | |
108.160.165.211 notify1.dropbox.com | |
108.160.165.211 notify2.dropbox.com | |
108.160.165.211 notify3.dropbox.com |
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
{ "data" : { "all" : [ { "area" : "0", | |
"areaName" : "全国", | |
"key" : "taylor swift", | |
"period" : "20110101|20140311", | |
"ratio" : { "agv_m" : "6064", | |
"agv_w" : "7079", | |
"qoq_m" : "-17", | |
"qoq_w" : "32", | |
"yoy_m" : "-44", | |
"yoy_w" : "-30" |