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
Deploybot | |
running | |
pause -> paused | |
continue -> running | |
stop -> stopped | |
paused | |
pause -> paused | |
continue -> running | |
stop -> stopped |
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
Arithmetic { | |
Exp | |
= ComposeExp ("," ComposeExp ) * end | |
ComposeExp | |
= exportIdent + Source ? | |
Source | |
= "from" url |
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 | |
i="0" | |
while [ $i -gt -1 ] | |
do | |
i=$[$i+1] | |
echo $i | |
( | |
node bot.js ws://localhost:5000 |
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 WebSocket = require('ws') | |
var ws = new WebSocket('ws://localhost:5000') | |
function rand(lim) { | |
return Math.floor(Math.random(lim) * lim) | |
} | |
function sample(col) { | |
return col[rand(col.length)] |
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 cssmodularize(strings) { | |
/* TODO: Un-stub */ | |
return { | |
'.foo': 'Button-foo-abcd' | |
} | |
} | |
class Button { | |
static styles = cssmodularize` |
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
/* | |
This file was autogenerated from Meta's CSS. I tried getting | |
postcss-for working but it turns out it's a massive PITA. /shrug | |
~ @chrislloyd | |
*/ | |
@media (--breakpoint-sm) { | |
.sm-m0 { margin: 0 } | |
.sm-mt0 { margin-top: 0 } | |
.sm-mr0 { margin-right: 0 } |
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
# ruby whitespace.rb | pbcopy | |
%w(sm md lg).each do |breakpoint| | |
puts "@media (--breakpoint-#{breakpoint}) {" | |
{ | |
0 => ['0', '0'], | |
1 => ['var(--space-1)', 'calc(0 - var(--space-1))'], | |
2 => ['var(--space-2)', 'calc(0 - var(--space-2))'], | |
3 => ['var(--space-3)', 'calc(0 - var(--space-3))'], |
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
// in this version, the user clicks the button, the request is sent to the server and the number of upvotes | |
// is only updated when the response comes back | |
handleClick: function(e) { | |
e.preventDefault(); | |
this.upvote(); | |
}, | |
upvote: function() { | |
// Not sure what the state name is here, just need this to toggle the button immediately |
NewerOlder