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
===== | |
usually I will see this: | |
server: | |
Error: stream.push() after EOF | |
at readableAddChunk (/Users/poga/new_hc/node_modules/readable-stream/lib/_stream_readable.js:198:15) | |
at Protocol.Readable.push (/Users/poga/new_hc/node_modules/readable-stream/lib/_stream_readable.js:176:10) | |
at Protocol.ping (/Users/poga/new_hc/node_modules/hypercore-protocol/index.js:186:15) | |
at Protocol._kick (/Users/poga/new_hc/node_modules/hypercore-protocol/index.js:175:10) | |
at Timeout.kick [as _onTimeout] (/Users/poga/new_hc/node_modules/hypercore-protocol/index.js:71:10) |
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
// before | |
// 通常這四個都有個共通的因素,才會被擺在一起 | |
if (rtn == RESULT_A || rtn == RESULT_B || rtn == RESULT_C || rtn == RESULT_D) { | |
Do1(); | |
} else { | |
Do2(); | |
} | |
// after | |
// 所以就把那個因素寫成 function name |
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
const hyperdrive = require('hyperdrive') | |
const swarm = require('hyperdrive-archive-swarm') | |
const memdb = require('memdb') | |
var d1 = hyperdrive(memdb()) | |
var a1 = d1.createArchive() | |
debug(swarm(a1)) | |
console.log('a1', a1.key.toString('hex')) | |
var d2 = hyperdrive(memdb()) | |
var a2 = d2.createArchive() |
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
const Browser = require("zombie") | |
let kktix = new Browser({waitDuration: 30*1000, runScript: true, site: "https://kktix.com"}) | |
kktix.visit("/", function(err, browser) { | |
if (err) console.log(err) | |
}) |
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
aa |
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
package main | |
import ( | |
"fmt" | |
) | |
type Service struct { | |
ErrorLevel int | |
AWSKey string | |
AWSSecret string |
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
alert_title,severity_level,alert_color,category,event,response_type,urgency,severity,certainty,audience,event_code,effective,expire,sender_name,headline,description,instruction,web,contact,resources,area_desc,area_geocode | |
淹水警戒,二級警戒,黃色,Met,淹水,"[""Monitor""]",Future,Moderate,Likely,,profile:CAP-TWP:Event:1.0: Flood,2014-07-23T00:30:00+08:00,2014-07-23T01:30:00+08:00,水利署,立山:警戒,"水利署訊:花蓮縣卓溪鄉淹水二級警戒(立山站3小時雨量128.5mm) ,如持續降雨轄內易淹水村里及道路可能3小時內開始積淹水(如:卓溪鄉-立山村),建請即時注意淹水通報及應變。",準備沙包檔水牆防淹水相關措施,http://fhy2.wra.gov.tw/Pub_Web_2011/Page/Flood.aspx,,[],花蓮縣卓溪鄉,Taiwan_Geocode_100: 1001513 | |
淹水警戒,一級警戒,紅色,Met,淹水,"[""Monitor""]",Future,Moderate,Observed,,profile:CAP-TWP:Event:1.0: Flood,2014-07-23T00:30:00+08:00,2014-07-23T01:30:00+08:00,水利署,明里:淹水,"水利署訊:花蓮縣富里鄉淹水一級警戒(明里站6小時雨量176mm) ,如持續降雨轄內易淹水村里及道路可能已經開始積淹水(如:富里鄉-明里村,萬寧村,新興村,羅山村),建請即時進行淹水通報及應變。",請注意疏散撤離資訊,http://fhy2.wra.gov.tw/Pub_Web_2011/Page/Flood.aspx,,[],花蓮縣富里鄉,Taiwan_Geocode_100: 1001510 | |
淹水警戒,一級警戒,紅色,Met,淹水,"[""Monitor""]",Future,Moderate,Observed,,profile:CAP-TWP:Event:1.0: Floo |
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
jQuery.ajax({ | |
url: url, | |
dataType: 'image/png', | |
type: 'GET', | |
complete: function(xhr){ | |
//check xhr.status here | |
} | |
}); |
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
export function mount-storage (plx, schema, table, cb) | |
# import a package | |
next <- plx.import-bundle-funcs 'jsonpatch', require.resolve("jsonpatch/package.json") | |
<- next! | |
<- plx.mk-user-func 'plv8x.json apply_patch(json, json[])', 'jsonpatch:apply_patch' | |
# import a module (without package.json) | |
next <- plx.import-bundle-funcs 'pgrest_schemaless', require.resolve('./user_func') | |
<- next! | |
# ... |
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
process.exit 1 |