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
#!/bin/sh -e | |
sudo mkdir -p /mnt/usb | |
sudo mount /dev/sda1 /mnt/usb | |
cd /mnt/usb | |
# find "pivx/wallet.dat" | |
mkdir -p $HOME/.pivx | |
sudo cp -f *pivx/*wallet.dat $HOME/.pivx/wallet.dat | |
sudo umount /dev/sda1 |
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
#!/bin/bash -e | |
output=$(pivx-cli getstakingstatus | jq -r '.["staking status"]') | |
if [ "$output" == "true" ]; then | |
echo "staking is active" | |
exit 0 | |
fi | |
echo "staking is NOT active" | |
exit 1 |
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
#!/usr/bin/env node | |
// node index.js '+1...' 'My Message.' | |
// `npm i plivo` | |
// create file: `.keys/index.js` | |
// and add: | |
// ```JS | |
// module.exports = { | |
// PLIVO_AUTH_ID: 'PLIVO_AUTH_ID', |
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
#!/bin/sh | |
# Add Apple OS X HFS+ read/write support | |
sudo apt-get install hfsutils hfsprogs hfsutils | |
# sudo mkfs.hfsplus /dev/sda1 -v untitled # format | |
# Add Windows/DOS FAT32 read/write support | |
sudo apt-get install dosfstools | |
# Add Windows NTFS read/write support |
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
#!/bin/sh -e | |
# pivx-xli stop | |
sudo systemctl disable pivxd | |
sudo systemctl stop pivxd | |
cp ./.pivx/wallet.dat ./wallet.PIVXbootstrapBackup.dat | |
cp ./.pivx/pivx.conf ./pivx.PIVXbootstrapBackup.conf | |
wget -O- -O ./.pivx/tmpbootstrap.zip https://github.com/PIVX-Project/PIVX/releases/download/v3.0.5.1/pivx-chain-910000-bootstrap.dat.zip | |
unzip ./.pivx/tmpbootstrap.zip -d ./.pivx |
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
#!/bin/sh -e | |
sudo apt-get install zip unzip | |
# zcoin-cli stop | |
sudo systemctl disable zcoind | |
sudo systemctl stop zcoind | |
rm -f $HOME/chainstate.backup.zip | |
cp $HOME/.zcoin/wallet.dat $HOME/wallet.backup.dat |
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
var service = {}, | |
// unit model | |
// 'singular': 'USD 1 Millon', | |
// 'plural': 'USD 1 Millon', | |
// 'abbr': '$1M', | |
// // also can be true and template would assume to be `abbr` | |
// // (for sbackwards compat) | |
// 'prefix': '$', | |
// 'postfix': 'M' |
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
/** | |
* The Good Sort. When your object attribute [values] are shady AF. | |
* @param {any} valueA | |
* @param {any} valueB | |
* @param {Boolean} descending - True for descending. Default is [false] ascending. | |
*/ | |
export default function sortJawn (valueA, valueB, descending = false) { | |
// the same... carry on | |
if (valueA === valueB) { | |
return 0 |
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
<html> | |
<head> | |
<!-- Polyfills only needed for Firefox and Edge. --> | |
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@next/webcomponents-loader.js"></script> | |
</head> | |
<body> | |
<!-- Works only on browsers that support Javascript modules like | |
Chrome, Safari, Firefox 60, Edge 17 --> | |
<script type="module"> | |
import { LitElement, html } from 'https://unpkg.com/@polymer/lit-element@latest/lit-element.js?module'; |
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
const hexGenerator = function(length = 16) { | |
let text = ""; | |
const possible = "ABCDEFabcdef0123456789"; | |
for(let i = 0; i < length; i++) { | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
} | |
return text; | |
} | |
// convert to random with parseInt(`0x${hexGenerator()}`, 16) |