Skip to content

Instantly share code, notes, and snippets.

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

Full $BCH ABC Node steps

Setup

  1. Ubuntu 16.04.3 x64
  2. 2 GB Memory / 60 GB Disk
  3. 200 GB block storage volume

Update and upgrade

@cgcardona
cgcardona / 1-to-many-p2pkh.js
Last active April 30, 2018 14:46
P2PKH script for sending from 1 to 999 addresses
let mnemonic = '';
let seed = BITBOX.Mnemonic.mnemonicToSeedBuffer(mnemonic);
let master = BITBOX.HDNode.fromSeedBuffer(seed, 'bitcoincash');
let byteCount = BITBOX.BitcoinCash.getByteCount({ P2PKH: 1 }, { P2PKH: 1000 });
let node = master.derivePath(`m/44'/145'/0'/0/0`);
anonymous
anonymous / shapeshiftPriceHunter.js
Created November 15, 2017 06:46
This script helps you get the best exchange rate for your coins on shapeshift.io
// This line ads a alert sound to be played when your target exchange has been met
$('body').append('<audio id="audio" src="https://www.soundjay.com/button/beep-07.wav" autostart="false" ></audio>');
// This line puts the sound into a variable to be used later
var sound = document.getElementById("audio");
// This is where the user enters the target exchange rate they wish to receive from those coins
var targetExchangeAmount = prompt("Please enter the target exchange rate you wish to receive at a minimum", "0");
// setInterval creates a loop that will check the price every 5 seconds.
@cooperka
cooperka / Pull directly from PRs.sh
Created July 19, 2017 15:00
A one-time setup to fetch code directly from GitHub PRs, so you don't need to download their fork or figure out their branch name.
# One-time setup
git config --global --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*" # This is the important one
# Make sure there aren't duplicate configs
git config --global --list
# Checkout someone else's PR!
git fetch origin
git checkout pr/20
@zkat
zkat / index.js
Last active July 9, 2026 05:43
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@romainl
romainl / devdocs.md
Last active June 19, 2023 04:31
Look up keywords on https://devdocs.io from Vim
@shospodarets
shospodarets / remove-merged-branches-to-the-current.sh
Last active May 2, 2017 11:15
Remove Git branches, which are merged to the current one (+ ability to exclude some of them)
#!/usr/bin/env bash
# based on https://gist.github.com/schacon/942899
# list
git branch -r --merged | grep origin | grep -v '>' | grep -v master\* | grep -v release-\* | xargs -L1
# delete
git branch -r --merged | grep origin | grep -v '>' | grep -v master\* | grep -v release-\* | xargs -L1 | awk '{sub(/origin\//,"");print}' | xargs git push origin --delete
const serialize = uri => decodeURIComponent(uri).split('&').map(uri => ({ [uri.split('=')[0]]: uri.split('=')[1] })).reduce((a,b) => Object.assign(a,b))
console.log(serialize("_id%3D58c43d995cb9191a2f676b25%26index%3D0%26guid%3D798ebd68-22d5-4465-9d34-d4717891901d%26isActive%3Dfalse%26balance%3D%242%2C569.51%26picture%3Dhttp%3A%2F%2Fplacehold.it%2F32x32%26age%3D33%26eyeColor%3Dgreen%26name%3DDesiree%20Cervantes%26gender%3Dfemale%26company%3DSYNKGEN%26email%3Ddesireecervantes%40synkgen.com%26phone%3D%2B1%20(975)%20536-2019%26address%3D855%20Hendrickson%20Street%2C%20Libertytown%2C%20Marshall%20Islands%2C%205292%26about%3DElit%20anim%20occaecat%20proident%20consectetur%20veniam%20et%20deserunt%20irure.%20Sint%20aliquip%20fugiat%20aute%20tempor%20veniam%20eu%20duis%20mollit%20eiusmod%20aliquip%20ipsum%20enim%20do%20in.%20Pariatur%20nisi%20proident%20commodo%20duis%20nisi%20id%20ut%20commodo%20aute%20irure.%20Minim%20ut%20tempor%20in%20tempor%20dolor%20ex%20veniam%20fugiat.%20Sint%20cillum%20non%20qui%20elit%20a
/*USAGE:
npm install ws lodash async moment crc-32
mkdir logs
node bfx_test_book.js BTCUSD
*/
const WS = require('ws')
const _ = require('lodash')
const async = require('async')
const fs = require('fs')