- https://saml.github.io
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 stream = require('stream'); | |
const r = new stream.Readable(); | |
const w = new stream.Duplex(); | |
r.pipe(w); | |
read(w) | |
.then((s) => { | |
console.log(s); | |
}) | |
.catch((err) => { | |
console.trace(err); |
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
foobar { {"a": {"b":1} } } yolo | |
^ ^ start | |
foobar { {"a": {"b":1} } } yolo | |
^ ^ json parsing fails | |
foobar { {"a": {"b":1} } } yolo | |
^ ^ fails | |
foobar { {"a": {"b":1} } } yolo | |
^ ^ fails | |
foobar { {"a": {"b":1} } } yolo | |
^ ^ found it! |
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
prompt = () => `${db.getName()}@${defaultPrompt()}`; |
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 | |
pkill -0 ibus-daemon || ibus-daemon -d | |
pkill -0 conky || conky -d | |
pkill -0 srandrd || $HOME/bin/srandrd $HOME/bin/srandrd.bash | |
SRANDRD_ACTION="$(xrandr | grep -e '^DP-1 ' | cut -d' ' -f1,2)" $HOME/bin/srandrd.bash |
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
bash-4.3# apk add opencv | |
ERROR: unsatisfiable constraints: | |
opencv-libs-3.1.0-r0: | |
masked in: @testing | |
satisfies: opencv-3.1.0-r0[so:libopencv_calib3d.so.3.1] opencv-3.1.0-r0[so:libopencv_core.so.3.1] opencv-3.1.0-r0[so:libopencv_highgui.so.3.1] opencv-3.1.0-r0[so:libopencv_imgcodecs.so.3.1] | |
opencv-3.1.0-r0[so:libopencv_imgproc.so.3.1] | |
so:libHalf.so.12 (missing): | |
required by: opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] | |
opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] | |
opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.12] opencv-libs-3.1.0-r0[so:libHalf.so.1 |
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
pkgname="openconnect-git" | |
pkgver=7.07 | |
pkgrel=1 | |
epoch=1 | |
pkgdesc="Open client for Cisco AnyConnect VPN" | |
arch=('i686' 'x86_64') | |
license=('LGPL2.1') | |
url="http://www.infradead.org/openconnect.html" | |
depends=('libxml2' 'gnutls' 'libproxy' 'vpnc' 'krb5' 'lz4' 'pcsclite') | |
makedepends=('intltool' 'python2') |
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
src/ | |
pkg/ | |
*.deb | |
*.pkg.tar.xz | |
network-manager-openconnect/ |
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 supertest = require('supertest-as-promised'); | |
var express = require('express'); | |
const app = express(); | |
function fetch() { | |
return supertest(app).get('/') |
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
set backspace=2 | |
set incsearch | |
set nospell | |
set smartindent | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set nobackup | |
set nowritebackup |
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 cmp(a, b) { | |
var n = Math.min(a.length, b.length); | |
for (var i = 0; i < n; i++) { | |
if (a[i] < b[i]) { | |
return -1; | |
} else if (a[i] > b[i]) { | |
return 1; | |
} | |
} | |
if (a.length === b.length) { |