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 git = require('nodegit') | |
const fs = require('fs-extra') | |
const { URL } = require('url') | |
const REPO_URL = 'git@github.com:org/path.git' | |
const CLONE_DIR = '/tmp/private-repo-clone-test' | |
;(async () => { | |
await fs.emptyDir(CLONE_DIR) | |
let authAttempted = false | |
await git.Clone.clone(REPO_URL, CLONE_DIR, { |
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 Module = require('module') | |
Module._resolveLookupPaths = new Proxy(Module._resolveLookupPaths, { | |
apply(target, self, args) { | |
console.dir(args[1].paths) | |
return target.apply(self, args) | |
} | |
}) | |
require('name-of-module') |
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 fs = require('fs') | |
const gs = require('glob-stream') | |
const File = require('vinyl') | |
const { Transform } = require('stream') | |
const map = (transform) => new Transform({ objectMode: true, transform }) | |
const ospath = require('path') | |
//const isUTF8 = require('is-utf8') | |
const { pipeline } = require('stream') | |
function smartStat (path_, callback) { |
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
let mapleader=";" | |
inoremap <Leader><Leader> <Leader> | |
if has("autocmd") | |
au BufRead,BufNewFile *.asciidoc | |
\ imap <buffer> <C-]> <C-o>B<C-o>E<Right><Space>| | |
\ imap <buffer> <C-i> <C-o>$<CR><CR>| | |
\ imap <buffer> <C-j> <Down><C-o>o<CR>| | |
\ imap <buffer> <Leader>h1 = | | |
\ imap <buffer> <Leader>h2 == | |
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
#!/usr/bin/env fontforge | |
# * 0x90 - Neither OpenType or Apple | |
# * 0x800 - Generate old-style 'kern' table | |
# * 0x08 - Exclude TrueType instructions | |
# For PDF | |
genflags = 0x90 + 0x08 + 0x800 | |
# For EPUB3 |
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
class PrismSyntaxHighlighter < Asciidoctor::SyntaxHighlighter::Base | |
register_for 'prism' | |
def format node, lang, opts | |
opts[:transform] = proc do |pre, code| | |
if node.attr? 'linenums', nil, false | |
pre['class'] += ' line-numbers' | |
if (start = node.attr 'start', nil, false) | |
pre['data-start'] = start | |
end |