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
curl -O https://raw.githubusercontent.com/hackclub/metrics/master/slack_stats.tsv | |
awk 'NR==1 { for (i=2;i<=NF;i++) x[i] = $i } NR!=1 {for (i=2;i<=NF;i++) print $1"\t"x[i]"\t"$i}' slack_stats.tsv > slack_stats_unpivoted.tsv | |
sqlite3 slack_stats.sqlite3 <<EOF | |
create table slack_stats (user text, date text, count int); | |
.separator "\t" | |
.import slack_stats_unpivoted.tsv slack_stats | |
EOF |
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
$ npm install -g [email protected] | |
[email protected] node_modules/npm/node_modules/npmlog/node_modules/ansi -> node_modules/npm/node_modules/ansi | |
- [email protected] node_modules/npm/node_modules/aproba | |
[email protected] node_modules/npm/node_modules/tar/node_modules/block-stream -> node_modules/npm/node_modules/block-stream | |
- [email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map | |
- [email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion | |
- [email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch | |
- [email protected] node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match | |
- [email protected] node_modules/npm/node_modules/iferr | |
- [email protected] node_modules/npm/node_modules/lodash._baseindexof |
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
const App = ({ items }) => | |
<List items={items} /> | |
const List = ({ items }) => | |
<ul> | |
{items.map(item => | |
<Item key={item.id} item={item} /> | |
)} | |
</ul> |
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
(date of facebook ipo) + 30 days = June 17, 2012 | |
http://www.wolframalpha.com/input/?i=%28date+of+facebook+ipo%29+%2B+30+days | |
market capitalization of facebook on June 17, 2012 = $64.24B | |
http://www.wolframalpha.com/input/?i=market+capitalization+of+facebook+on+June+17%2C+2012 | |
$33B with 5% interest from September 23, 2010 to June 17, 2012 = $35.99B | |
http://www.wolframalpha.com/input/?i=compound+interest&a=*C.compound+interest-_*Formula.dflt-&a=FSelect_**PresentValueFutureValueContinuousDates-.dflt-&a=*FS-_**PresentValueFutureValueContinuousDates.FV-.*PresentValueFutureValueContinuousDates.PV-.*PresentValueFutureValueContinuousDates.i--&f4=%2433000000000&f=PresentValueFutureValueContinuousDates.PV%5Cu005f%2433000000000&f5=5+%25&f=PresentValueFutureValueContinuousDates.i%5Cu005f5+%25&f6=September+23%2C+2010&f=PresentValueFutureValueContinuousDates.ID_September+23%2C+2010&f7=June+17%2C+2012&f=PresentValueFutureValueContinuousDates.MD_June+17%2C+2012 | |
(($64.24 - $35.99)/ $35.99) * $10,000 = $7,849 |
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
// give it a name so it reuses the same window | |
var win = window.open(null, "redux-devtools", "menubar=no,location=no,resizable=yes,scrollbars=no,status=no"); | |
// reload in case it's reusing the same window with the old content | |
win.location.reload(); | |
// wait a little bit for it to reload, then render | |
setTimeout(function() { | |
React.render( | |
<DebugPanel top right bottom left > |
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
rec -t raw -r 8000 -s -2 - | \ | |
./src/c2enc 1400 - - | \ | |
./src/c2dec 1400 - - | \ | |
play -t raw -r 8000 -s -2 - |
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
$ docker run --net=none -t -i jpetazzo/dind | |
/dev/mapper/control: open failed: Operation not permitted | |
Failure to communicate with kernel device-mapper driver. | |
Check that device-mapper is available in the kernel. | |
Command failed | |
mount: permission denied | |
Could not make a tmpfs mount. Did you use --privileged? |
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 git push | |
WARNING: You called a Git command named 'git', which does not exist. | |
Continuing under the assumption that you meant 'init' | |
in 0.1 seconds automatically... | |
Initialized empty Git repository in /Users/tlrobinson/whatever/push/.git/ |
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
type OnDataCallback func(InPort, func(string)) | |
type ReactiveComponent func(*Process, OnDataCallback) | |
func AdaptReactiveComponent(component ReactiveComponent) Component { | |
return func(proc *Process) { | |
var wg sync.WaitGroup | |
onData := func(port InPort, callback func(string)) { | |
wg.Add(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
$ babel-node examples/matttest.es6 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 0 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 0 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 1 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 1 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 2 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 2 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 3 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender2) sending: 3 | |
Wed Mar 11 2015 11:47:26 GMT-0700 (PDT): Network([unknown]).Process(sender1) sending: 4 |