Skip to content

Instantly share code, notes, and snippets.

View hirishh's full-sized avatar

hirish hirishh

View GitHub Profile
@hirishh
hirishh / liskaddresses.js
Created December 9, 2017 20:02
SYNC DEL PD E PM
'user strict';
var debug = require('debug')('aps-scheduler');
var config = require('config');
var Address = require('mysql-easy-model').model('address');
var Repeat = require('repeat');
var hub = require('hub');
var satoshi = 100000000;
exports.updateAddresses = function() {
@hirishh
hirishh / polkadot_updater.sh
Last active March 3, 2021 22:23
Polkadot updater
#!/bin/bash
get_latest_release () {
curl --silent "https://api.github.com/repos/paritytech/polkadot/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
V=`get_latest_release`
SERVICE="polkadot-validator"
[Unit]
Description=Polkadot Validator
[Service]
User=polkadot
Group=polkadot
# Set this command accordingly
ExecStart=/<complete_path>/polkadot --validator --name <name> --db=paritydb --chain=polkadot --telemetry-url 'wss://telemetry-backend.w3f.community/submit 1'
Restart=always
RestartSec=120