Skip to content

Instantly share code, notes, and snippets.

@mattcollier
mattcollier / bad_regex.txt
Created November 1, 2018 00:15
ajv bad regex
const pattern = cfg.environment === 'live' ?
"^(did\:v1\:nym\:|did\:v1\:uuid\:)([-_A-Za-z0-9.]+)$" :
"^(did\:v1\:test\:nym\:|did\:v1\:test\:uuid\:)([-_A-Za-z0-9.]+)*$";
@mattcollier
mattcollier / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created September 25, 2018 17:25 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

nohup node --inspector=10.10.0.17:9229 ./primary/index.js --aws >/dev/null 2>&1
@mattcollier
mattcollier / some.sh
Last active June 6, 2018 12:49
debian git from backports
cat <<EOF | tee /etc/apt/sources.list.d/stretch-backports.list
deb http://http.debian.net/debian stretch-backports main contrib non-free
EOF
cat << EOF | tee /etc/apt/preferences.d/90_stretch-backports_packages
Package: git git-man
Pin: release n=stretch-backports
Pin-Priority: 1000
EOF
const boo = 'hello';
assert.bool(boo, 'boo');
AssertionError [ERR_ASSERTION]: boo (bool) is required
at new AssertionError (internal/assert.js:268:11)
at _toss (/home/matt/dev/t3/node_modules/assert-plus/assert.js:22:11)
at Function.out.(anonymous function) [as bool] (/home/matt/dev/t3/node_modules/assert-plus/assert.js:122:17)
at Object.<anonymous> (/home/matt/dev/t3/index.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
@mattcollier
mattcollier / .gitignore
Last active February 22, 2018 19:11
abc
node_modules
{
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6
}
}
2018-02-06T00:48:19.266Z - debug: lrange/mget events null workerPid=2678, details={
"events": [
null,
null,
null,
"{\"event\":{\"@context\":\"https://w3id.org/webledger/v1\",\"type\":\"WebLedgerEvent\",\"operation\":\"Create\",\"input\":[{\"@context\":\"https://w3id.org/test/v1\",\"id\":\"https://example.com/events/123\",\"type\":\"Concert\",\"name\":\"Primary Event\",\"startDate\":\"2017-07-14T21:30\",\"location\":\"https://example.org/the-venue-new-york\",\"offers\":{\"type\":\"Offer\",\"price\":\"13.00\",\"priceCurrency\":\"USD\",\"url\":\"https://example.com/purchase/13b5117e-cea8-4720-889b-766740915476\"}}],\"treeHash\":\"ni:///sha-256;ICi2fOsJeWyN6p3VZoYcLVNpyw0thOU-0vfkH8PZyC4\",\"parentHash\":[\"ni:///sha-256;ICi2fOsJeWyN6p3VZoYcLVNpyw0thOU-0vfkH8PZyC4\"]},\"meta\":{\"eventHash\":\"ni:///sha-256;Jl7S3xGE0S8d4SdA2I8aLduYgKN_7B9c51nIYR-TZ8M\"}}"
]
}, module=ledger-consensus-continuity
2018-02-06T00:48:19.266Z - debug: VALID JSON events length: 1 workerPid=2678, module=ledger-consensu
{
"name" : "meta.created_1",
"key" : {
"meta.created" : 1
},
"host" : "ip-172-31-0-64:27017",
"accesses" : {
"ops" : NumberLong(982),
"since" : ISODate("2018-01-22T04:10:52.479Z")
}