This file contains hidden or 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
| // From the terminal in the save directory where this script is saved: | |
| // npm i bip39 bip32 @bitcoinerlab/secp256k1 | |
| // MNEMONIC="your mnemonic here" node derive-pubkey.cjs | |
| const bip39 = require('bip39') | |
| const BIP32Factory = require('bip32').default | |
| const ecc = require('@bitcoinerlab/secp256k1') | |
| const bip32 = BIP32Factory(ecc) |
This file contains hidden or 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
| // Bitcoin Price Widget using Yadio.io | |
| let widget = new ListWidget(); | |
| widget.setPadding(16, 16, 16, 16); | |
| widget.backgroundColor = new Color("#1a1a1a"); | |
| let title = widget.addText("₿ Bitcoin Price"); | |
| title.font = Font.boldSystemFont(16); | |
| title.textColor = Color.white(); | |
| widget.addSpacer(8); |
This file contains hidden or 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
| sudo ntpdate -b time.nist.gov |
This file contains hidden or 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
| CREATE EXTENSION citext; | |
| CREATE DOMAIN email AS citext | |
| CHECK ( value ~ '^[a-zA-Z0-9.!#$%&''*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$' ); |
This file contains hidden or 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
| $ sudo -u postgres psql | |
| psql (14.1 (Ubuntu 14.1-2.pgdg20.04+1)) | |
| Type "help" for help. | |
| postgres=# \password postgres | |
| Enter new password: | |
| Enter it again: |
This file contains hidden or 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
| # https://askubuntu.com/questions/1198903/can-not-use-swap-file-on-zfs-files-with-holes/1198916#1198916 | |
| sudo zfs create -V 8G -b $(getconf PAGESIZE) -o logbias=throughput -o sync=always -o primarycache=metadata -o com.sun:auto-snapshot=false rpool/swap | |
| sudo mkswap -f /dev/zvol/rpool/swap | |
| sudo swapon /dev/zvol/rpool/swap | |
| # Make the swap persistent after reboot | |
| # https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04#step-5-making-the-swap-file-permanent |
This file contains hidden or 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
| 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; |
This file contains hidden or 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
| 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' |
This file contains hidden or 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
| // 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); |
This file contains hidden or 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
| // work in progress | |
| // you need a poloniex API key and secret with trading option enabled | |
| // you can test it with: | |
| // = polo("returnBalances","BTC") | |
| // or | |
| // = polo("returnBalances","all") | |
| // or buy and sell: | |
| // polo("BUY","BTC_LTC", 0.0251, 1) or polo("SELL","BTC_LTC", 0.0251, 1) |
NewerOlder