Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nmarley's full-sized avatar
🦀
我想吃一點點東西。

Nathan Marley nmarley

🦀
我想吃一點點東西。
View GitHub Profile
@nmarley
nmarley / gencert.rb
Last active April 29, 2022 21:20
Ruby script to generate SSL certificates
#! /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 August 29, 2015 17:44
Freshbooks Category list - 2015-08-29
[
{
"category_id": "00002254911",
"name": "Other Expenses",
"parent_id": null
},
{
"category_id": "00002254912",
"name": "Reference Materials",
"parent_id": "00002254911"
@nmarley
nmarley / README.md
Last active August 31, 2015 16:04
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
nmarley / README.md
Last active October 1, 2015 13:54
Dash upgrade script(s)

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 October 5, 2015 00:45
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
nmarley / dash.service
Created October 20, 2015 19:16
INCOMPLETE systemd dashd service script
[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 October 25, 2015 17:35
Ansible ssh host key scan and set variable
#! /bin/bash
ansible-playbook -e hostname=github.com ssh-host-key-lookup.yml
@nmarley
nmarley / .gitignore
Created November 15, 2015 01:57
Poloniex examples in Ruby with 'poloniex' gem.
.env
@nmarley
nmarley / dash.js
Created January 8, 2016 04:56
Example usage of node-coind
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 January 9, 2016 05:48 — forked from m-mizutani/ptree.h
Patricia Tree Template in C++
#ifndef __PTREE_H__
#define __PTREE_H__
#include <sys/types.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>