Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Marley nmarley

View GitHub Profile
@nmarley
nmarley / gencert.rb
Last active Aug 25, 2015
Ruby script to generate SSL certificates
View gencert.rb
#! /usr/bin/env ruby
#
# gencert.rb
# =====================================================================
# description: This script will accepts an FQDN as an argument
# and generates a Secure Sockets Layer (SSL)
# certificate request and a private key that corresponds
# to the request. It will not overwrite any existing
# files, so file <fqdn>.cnf , <fqdn>.csr , or <fqdn>.key
# exist, the program will print a message and exit.
@nmarley
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
nmarley / README.md
Last active Aug 31, 2015
Sett print stylesheet suggestion
View README.md

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
nmarley / README.md
Last active Oct 1, 2015
Dash upgrade script(s)
View README.md

Dash upgrade scripts.

Steps:

  1. Update location/file version in script 'prep-dash-release.sh'.
  2. Then distribute prep-dash-release.sh script by executing 'dist.sh'
  3. If any new masternodes are added, add them to dist.sh
  4. Login to individual servers and run:
@nmarley
nmarley / LICENSE
Last active Oct 5, 2015
Dash binary downloads - check most recent version
View LICENSE
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
nmarley / dash.service
Created Oct 20, 2015
INCOMPLETE systemd dashd service script
View dash.service
[Unit]
Description=Dash server
After=syslog.target
After=network.target
[Service]
Type=forking
User=<dash user>
Group=<dash group>
ExecStart=<dash_path>/dashd
@nmarley
nmarley / run.sh
Last active Oct 25, 2015
Ansible ssh host key scan and set variable
View run.sh
#! /bin/bash
ansible-playbook -e hostname=github.com ssh-host-key-lookup.yml
@nmarley
nmarley / .gitignore
Created Nov 15, 2015
Poloniex examples in Ruby with 'poloniex' gem.
@nmarley
nmarley / dash.js
Created Jan 8, 2016
Example usage of node-coind
View dash.js
var util = require('util')
var coind = require('node-coind')
var client = new coind.Client({
host: 'localhost',
port: 9998, // production = 9998
user: process.env.DARKCOINRPC_USER,
pass: process.env.DARKCOINRPC_PASS
})
var cb = function (err, data) {
@nmarley
nmarley / ptree.h
Created Jan 9, 2016 — forked from m-mizutani/ptree.h
Patricia Tree Template in C++
View ptree.h
#ifndef __PTREE_H__
#define __PTREE_H__
#include <sys/types.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>