Skip to content

Instantly share code, notes, and snippets.


Nathan Marley nmarley

View GitHub Profile
nmarley / parse_wci.rb
Last active Aug 29, 2015
WorldCoinIndex parser
View parse_wci.rb
require 'nokogiri'
require 'bigdecimal'
require 'bigdecimal/util'
require 'ap'
require 'pp'
def text_to_number(text)
val = text.dup
val.gsub!(/\s+/, '')
nmarley / analyze-tarsnap-usage.rb
Last active Aug 29, 2015
Analyse Tarsnap Usage
View analyze-tarsnap-usage.rb
require 'open3'
require 'pp'
def get_stats(archive_name)
cmd = "sudo tarsnap --print-stats -f #{archive_name}"
stats = run_cmd(cmd)[3,4]
def get_uniq_comp_size(stats)
nmarley / check.rb
Last active Aug 29, 2015
Domain Expiration Checker
View check.rb
#! /usr/bin/env ruby
require 'whois'
require 'date'
require 'time'
require 'pp'
require 'awesome_print'
class Chequer
def initialize
nmarley / fresh-cats.json
Last active Aug 29, 2015
Freshbooks Category list - 2015-08-29
View fresh-cats.json
"category_id": "00002254911",
"name": "Other Expenses",
"parent_id": null
"category_id": "00002254912",
"name": "Reference Materials",
"parent_id": "00002254911"
nmarley /
Last active Aug 31, 2015
Sett print stylesheet suggestion

Print stylesheet for SETT blogs - hide print obstructions

Stylesheet for removing HTML elements from SETT blogs which obstruct printing and making it easy to print/render to PDF format.

Because blue light from computer screens is hard on my eyes, I like to print longer web pages/posts and read them on paper. But sometimes it's hard to print without using the developer tools and stripping away elements from the HTML manually.

nmarley /
Last active Oct 1, 2015
Dash upgrade script(s)

Dash upgrade scripts.


  1. Update location/file version in script ''.
  2. Then distribute script by executing ''
  3. If any new masternodes are added, add them to
  4. Login to individual servers and run:
nmarley / LICENSE
Last active Oct 5, 2015
Dash binary downloads - check most recent version
The MIT License (MIT)
Copyright (c) 2015 Nathan Marley
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
nmarley / dash.service
Created Oct 20, 2015
INCOMPLETE systemd dashd service script
View dash.service
Description=Dash server
User=<dash user>
Group=<dash group>
nmarley /
Last active Oct 25, 2015
Ansible ssh host key scan and set variable
#! /bin/bash
ansible-playbook -e ssh-host-key-lookup.yml
nmarley / .gitignore
Created Nov 15, 2015
Poloniex examples in Ruby with 'poloniex' gem.