Skip to content

Instantly share code, notes, and snippets.

View tobio's full-sized avatar

Toby Brain tobio

  • Wodonga, Australia
View GitHub Profile
@tobio
tobio / get_client_details.php
Created June 6, 2012 22:15
Getting client currency and markup values
<?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";
@tobio
tobio / generation.sh
Last active June 2, 2017 12:30
Certbot for Ubiquiti devices
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 / keybase.md
Created October 25, 2018 02:50
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: