Skip to content

Instantly share code, notes, and snippets.

Avatar

Toby Brain tobio

  • Wodonga, Australia
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am tobio on github.
  • I am tobio (https://keybase.io/tobio) on keybase.
  • I have a public key ASCIaGU-1dSGtzSaOHY6QuFg_cWA-rdPgMyTO0QWrceXUAo

To claim this, I am signing this object:

@tobio
tobio / generation.sh
Last active Jun 2, 2017
Certbot for Ubiquiti devices
View generation.sh
echo dns_nsone_api_key=abc123def > /etc/letsencrypt/nsone.ini
certbot certonly --dns-nsone --dns-nsone-credentials /etc/letsencrypt/nsone.ini -d router.modestmind.net -d switch.modestmind.net -d unifi.modestmind.net
cd /etc/letsencrypt/live/router.modestmind.net
# Lighttpd expects a single pem with the key and certificate chain
cat privkey.pem fullchain.pem > combined.pem
# Copy the certificate to the devices
scp combined.pem router.modestmind.net:/etc/lighttpd/server.pem
scp combined.pem switch.modestmind.net:/etc/server.pem
@tobio
tobio / get_client_details.php
Created Jun 6, 2012
Getting client currency and markup values
View get_client_details.php
<?php
require_once '../../csrest_clients.php';
$wrap = new CS_REST_Clients('Your clients ID', 'Your API Key');
$result = $wrap->get();
echo "Result of GET /api/v3/clients/{id}\n<br />";
if($result->was_successful()) {
echo "Got client";