Skip to content

Instantly share code, notes, and snippets.

captainVersion: 1
instructions:
start: BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free. https://btcpayserver.org/
end: |
The bitcoin application is ready.
If you selected the testnet network, you can speed up the blockchain sync as follow
1. scale down to 0 bitcoind instance
2. download a blockchain snapshot here https://keybase.pub/coinfused/
3. run ssh root@your.server.ip "cd /var/lib/docker/volumes/captain--bitcoin-testnet-datadir/_data/testnet3 && tar -xzv" < /your/local/path/testnet.tar.gz
4. scale up the bitcoind instance to 1 or more
{
"captainVersion": "2",
"instructions": {
"start": "start",
"end": "end"
},
"variables": [],
"dockerCompose": {
"version": "3",
"services": {
sudo ec/build/samus/util/ectool fanduty 0
sudo /etc/init.d/docker status
#Create new docker group (in case the previous one is not exist)
sudo groupadd docker
#groupadd: group ‘docker’ already exists
#add your current logged in user t the docker group
sudo usermod -aG docker $USER
#Restart docker daemon / service
@learntheropes
learntheropes / 1_virtualbox.sh
Last active April 15, 2019 15:02
Influxdb Kubernetes locally
sudo apt-get update && sudo apt-get install -y apt-transport-https
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"
sudo apt update
sudo apt install virtualbox-6.0
@learntheropes
learntheropes / isEmpty.js
Last active February 4, 2022 07:49
isEmpty and isFinite functions
function isEmpty(value){
return value === undefined ||
value === null ||
(typeof value === "object" && Object.keys(value).length === 0) ||
(typeof value === "string" && value.trim().length === 0)
}
module.exports = isEmpty;
### Keybase proof
I hereby claim:
* I am coinfused on github.
* I am coinfused (https://keybase.io/coinfused) on keybase.
* I have a public key ASAoLXqKwlmqweyi_UDxcKY6rcies_QZ89jC1ow2noZFDQo
To claim this, I am signing this object:

Lua, Luarocks, Moonscript, Lapis and dependencies

sudo apt-get install git lua5.1 luarocks libssl1.0.0 libssl-dev
sudo luarocks install lapis
sudo luarocks install moonscript

Openresty

sudo apt-get install libpcre3-dev libssl-dev perl make build-essential curl
user_agent_parsers:
#### SPECIAL CASES TOP ####
# CFNetwork Podcast catcher Applications
- regex: '(ESPN)[%20| ]+Radio/(\d+)\.(\d+)\.(\d+) CFNetwork'
- regex: '(Antenna)/(\d+) CFNetwork'
family_replacement: 'AntennaPod'
- regex: '(TopPodcasts)Pro/(\d+) CFNetwork'
- regex: '(MusicDownloader)Lite/(\d+)\.(\d+)\.(\d+) CFNetwork'
- regex: '^(.*)-iPad/(\d+)\.?(\d+)?.?(\d+)?.?(\d+)? CFNetwork'
@learntheropes
learntheropes / bittrex_private_and_public_api.gs
Last active March 3, 2021 08:57
Bittrex private and public API for Google Apps Script (Google Sheet)
// work in progress
// you need a bittrex API key and secret with read account option enabled
// I assume that all the keys are in the "keys" spreadsheet. The key is in cell B5 and the secret in cell C5
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("keys");
var key = sheet.getRange("B5").getValue()
var secret = sheet.getRange("C5").getValue();
var baseUrl = 'https://bittrex.com/api/v1.1/';
var nonce = Math.floor(new Date().getTime()/1000);