Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
"use strict";
console.log("This is pid " + process.pid);
setTimeout(function () {
process.on("exit", function () {
require("child_process").spawn(process.argv.shift(), process.argv, {
cwd: process.cwd(),
@AndrewRadev
AndrewRadev / lebab.vim
Last active April 17, 2018 18:58
Use the "lebab" tool through Vim
" Invoke the `lebab` tool on the current buffer (https://github.com/lebab/lebab)
"
" Usage:
"
" :Lebab <transform1> <transform2> [...]
"
" This will run all the transforms specified and replace the buffer with the
" results. The available transforms tab-complete.
"
command! -nargs=+ -complete=custom,s:LebabComplete
@just3ws
just3ws / gogodoots.zsh
Created March 20, 2018 15:33
Script to easily run multiple queries for types of files and dump them to a simplified JSON string.
#!/usr/bin/env zsh
# vim:set ft=zsh:
local word="$1"
local filter=".items[] | { repository: .full_name, username: .owner.login, reponame: .name, branch: .default_branch, description: .description }"
local query="q=$word in:path fork:false"
# local query="q=evil fork:false language:\"Emacs Lisp\""
echo -n '{"query": "'
echo -n "$query"
echo '"}'