This file contains hidden or 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 through = require('through2') | |
function subscribe (collection, params) { | |
var options = { | |
tailable: true, | |
awaitData: true, | |
noTimeout: true, | |
numberOfRetries: Number.MAX_VALUE, | |
} | |
This file contains hidden or 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
open http://localhost:8080/bundle | |
webpack-dev-server --config webpack.test.js --hot |
This file contains hidden or 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 you have font size around 12, it's pretty annoying to have no space at the top | |
of the file. To fix, add this class selection. | |
*/ | |
atom-text-editor:not(.mini)::shadow { | |
.scroll-view { padding-top: 10px; } | |
.gutter { padding-top: 10px; } |
This file contains hidden or 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
Chapter 9 / Mira / Page 59 | |
"Through you off" -> "Throw" | |
Chapter 11 / After 10 Qs / Page 70 | |
"rather than the a crisp" | |
Chapter 16 / Limitations / Page 103 | |
"What product to build?" | |
"FaceBook" inconsistent |
This file contains hidden or 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
// node lock-catcher.js myprogram.go | |
var reader = require('line-reader') | |
var file = process.argv[2] | |
var prev = null | |
reader.eachLine(file, function (line) { | |
if (prev && /Lock/.test(prev) && !/defer/.test(line)) { | |
console.error('You probably messed up.') | |
} |
This file contains hidden or 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
{EventEmitter} = require "events" | |
backoff = require "backoff" | |
WebSocket = require "ws" | |
class EverSocket extends EventEmitter | |
constructor: (url, options) -> | |
@connected = false | |
@reconnect = true | |
@backoff = backoff.fibonacci() |
This file contains hidden or 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
:local(.green) { | |
height: 20px; | |
background: green; | |
} |
This file contains hidden or 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
Private Function LinearInterpolate(ByVal x2 As Integer, ByVal y2 As Double, | |
ByVal x3 As Integer, ByVal y3 As Double) As Double | |
Try | |
LinearInterpolate = ((y2 - y3) / (x2 - x3)) * x2 + y2 | |
Catch ex As Exception | |
SharedLogger.LogException(_moduleID & ":LI", ex) 'Log any exceptions. | |
LinearInterpolate = (y2 + y3) / 2 | |
End Try |
This file contains hidden or 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
ADD CONSTRAINT with_old_syntax CHECK (status <> 'closed' OR agent_id IS NOT NULL); | |
ADD CONSTRAINT with_new_syntax CHECK (agent_id IS NOT NULL) WHERE (status = 'closed'); | |
-- generically it would map as follows | |
CHECK (check_condition) WHERE (where_condition) | |
CHECK (NOT (where_condition) OR check_condition) |