{
"body": {
"key": {
"fingerprint": "9807fcf997789f7d922b282d2ff3245ce02f2c23",
"host": "keybase.io",
"key_id": "2ff3245ce02f2c23",
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
import { NextApiRequest } from 'next'; | |
// Inspired by https://github.com/myshenin/aws-lambda-multipart-parser | |
export interface FilePart { | |
type: string | |
filename: string | |
contentType: string | |
content: unknown | |
} |
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 datasourceLayer = new LayerVersion(this, id + 'DatasourceLayer', { | |
code: new TypeScriptCode('./src/layers/datasource/datasource.ts', { | |
buildOptions: { | |
external: [ | |
'pg-native', | |
'pg', | |
'typeorm', | |
'typeorm-aurora-data-api-driver', | |
], | |
// keepNames: true, |
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
'use strict'; | |
function wrapHandler (handler, callback) { | |
var name = arguments[0].name || 'clone'; | |
return function (err) { | |
if (err) return callback(err); | |
console.log(name, 'called with', arguments); | |
var args = Array.prototype.slice.call(arguments, 1); | |
args.push(callback); | |
handler.apply(this, args); |
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
'use strict'; | |
var mimelib = require('mimelib'); | |
var EOL = '\r\n'; | |
module.exports = formpart; | |
function escapeQuotation (str) { | |
return str.replace(/"/g, '\"'); |
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
'use strict'; | |
module.exports = HashTable; | |
function HashTable () { | |
this.index = []; | |
this.table = []; | |
} | |
HashTable.prototype = { |
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 whenAll (objects, event, callback) { | |
var callbackWrapper = _.after(objects.length, callback); | |
_.each(objects, function (obj) { | |
obj.once(event, callbackWrapper, this); | |
}, this); | |
} |
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
<div id="gignal-stream"> | |
<link rel="stylesheet" href="//gignal.github.io/widget/gignal/lib/style.min.css" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> | |
<script src="//platform.twitter.com/widgets.js"></script> | |
<script src="//gignal.github.io/widget/gignal/lib/app.min.js"></script> | |
<header></header> | |
<div id="gignal-widget" data-eventid="8GMtlyQyWN"></div> |
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
$ ping google.com | |
PING google.com (74.125.228.101): 56 data bytes | |
64 bytes from 74.125.228.101: icmp_seq=0 ttl=52 time=18.023 ms | |
64 bytes from 74.125.228.101: icmp_seq=1 ttl=52 time=81.646 ms | |
64 bytes from 74.125.228.101: icmp_seq=2 ttl=52 time=81.636 ms | |
64 bytes from 74.125.228.101: icmp_seq=3 ttl=52 time=22.099 ms | |
64 bytes from 74.125.228.101: icmp_seq=4 ttl=52 time=79.649 ms | |
64 bytes from 74.125.228.101: icmp_seq=5 ttl=52 time=78.707 ms | |
64 bytes from 74.125.228.101: icmp_seq=6 ttl=52 time=36.977 ms | |
Request timeout for icmp_seq 7 |
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 redis = require('redis'); | |
module.exports = function () { | |
client = redis.createClient(process.env.REDIS_PORT, process.env.REDIS_HOST); | |
if (process.env.REDIS_AUTH) { | |
client.auth(process.env.REDIS_AUTH); | |
} | |
client.on('error', function (err) { | |
console.error('Redis error', err); | |
}); |
NewerOlder