Skip to content

Instantly share code, notes, and snippets.

@zzzgit
Last active October 7, 2019 07:31
Show Gist options
  • Save zzzgit/a9ba7d541c42c7188b8c688d0d07120a to your computer and use it in GitHub Desktop.
Save zzzgit/a9ba7d541c42c7188b8c688d0d07120a to your computer and use it in GitHub Desktop.
shell
let gql = fs.readFileSync(path.resolve(__dirname, `./${filename}.gql`), { encoding: "UTF-8" })
let obj = { query: gql}
function! MyVerticalMotions(up)
let motion = "j"
if a:up
let motion = "k"
endif
execute "normal! " . motion
while synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") == "Comment" && line('.') < line('$') && line('.') > 1
execute "normal! " . motion
endwhile
endfunction
nnoremap <silent> j :call MyVerticalMotions(0)<CR>
nnoremap <silent> k :call MyVerticalMotions(1)<CR>
systemctl list-units -t service --no-pager --no-legend | grep active | grep -v systemd | grep -v exited | awk '{ print $1 }'
ss -l -p -n | grep ",1234,"
!/bin/sh
curl -H "Authorization: bearer fdab286807ecd23d29ca911776d377d449d01f11" -X POST -d "$data" https://api.github.com/graphql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment