I hereby claim:
- I am othree on github.
- I am othree (https://keybase.io/othree) on keybase.
- I have a public key ASD8QgnNRrlnxy-XpqdiCk2-CHr3ejT_H0zWozq8zm1r7Qo
To claim this, I am signing this object:
start | |
= orQuery? | |
orQuery | |
= left:andQuery Or right:orQuery { return {"op": "or", "left": left, "right": right}; } | |
/ andQuery | |
andQuery | |
= left:notQuery And right:andQuery { return {"op": "and", "left": left, "right": right}; } | |
/ notQuery |
let g:switch_custom_definitions = | |
\ [ | |
\ { | |
\ '\<\(\l\)\(\l\+\(\u\l\+\)\+\)\>': '\=toupper(submatch(1)) . submatch(2)', | |
\ '\<\(\u\l\+\)\(\u\l\+\)\+\>': "\\=tolower(substitute(submatch(0), '\\(\\l\\)\\(\\u\\)', '\\1_\\2', 'g'))", | |
\ '\<\(\l\+\)\(_\l\+\)\+\>': '\U\0', | |
\ '\<\(\u\+\)\(_\u\+\)\+\>': "\\=tolower(substitute(submatch(0), '_', '-', 'g'))", | |
\ '\<\(\l\+\)\(-\l\+\)\+\>': "\\=substitute(submatch(0), '-\\(\\l\\)', '\\u\\1', 'g')", | |
\ } | |
\ ] |
var gulp = require('gulp'); | |
var rollup = require('rollup').rollup; | |
var nodeResolve = require('rollup-plugin-node-resolve'); | |
var commonjs = require('rollup-plugin-commonjs'); | |
var typescript = require('rollup-plugin-typescript'); | |
var replace = require('rollup-plugin-replace'); | |
gulp.task('default', ['bundle']); | |
gulp.task('bundle', function () { |
{ | |
"!name": "jQuery", | |
"!define": { | |
"offset": { | |
"top": "number", | |
"left": "number" | |
}, | |
"keyvalue": { | |
"name": "string", | |
"value": "string" |
const nfapply = function (fn, args) { | |
return new Promise(function (resolve, reject) { | |
var cb = function (err, data) { | |
if (err) { reject(err); } | |
resolve(data); | |
}; | |
args.push(cb); | |
fn.apply(null, args); |
const spawn = require('child_process').spawn; | |
// const exec = require('child_process').execSync; | |
const exec = function (cmd, args) { | |
return new Promise(function (resolve) { | |
const execution = spawn(cmd, args); | |
execution.stdout.on('data', (data) => { | |
var str = data.toString(); | |
var lines = str.split(/(\r?\n)/g); | |
for (var i = 0; i < lines.length; i++) { |
?exists: //article/div[@id="comments"] | |
author: "othree" | |
channel: "@othree" | |
body: //article | |
title: $body//h3[1] | |
cover: $body/section[@itemprop="articleBody"]/p[1]/a[@itemprop="image"]/img |
I hereby claim:
To claim this, I am signing this object:
git config --global alias.link '!f() { echo https://$(git config --get remote.origin.url | sed s/^[[:alpha:]]*@// | sed s/:/\\// | sed s/\\.git$//)/commit/$(git rev-parse ${1:-HEAD}); }; f' | |
git config --global alias.linkc '!git link ${1:-HEAD} | pbcopy' |
# https://gist.github.com/cpjolicoeur/8864444 | |
bind generic f !@git fetch | |
bind generic p !@git pull | |
bind generic P !@git push | |
bind generic { !?git push -f | |
bind generic r !git rebase -i master | |
bind generic U !@sh -c "git checkout master && git pull && git checkout - && git rebase master" | |
bind generic M !@git checkout master | |
bind generic ! !@git reset HEAD^ |