Skip to content

Instantly share code, notes, and snippets.

View rossigee's full-sized avatar

Ross Golder rossigee

View GitHub Profile
@rossigee
rossigee / file_age_secs
Created February 6, 2015 04:39
Checks number of seconds since a file was changed
#!/bin/bash
#
# Returns (via stdout) the number of seconds since a file was last changed. Useful for checking a
# 'success' timestamp/flag file to identify a stale/dead process.
#
echo $[`date +%s` - `stat -c %Y $1`]
@rossigee
rossigee / cpd-oauth2-session-token.php
Last active August 29, 2015 14:16
Checking/obtaining an OAuth2 session token w/CPD REST API v1
<?php
$params = array(
"client_id" => "683c5835a8d36a5bb974",
"client_secret" => "50ac9cb374989802d3d437c3fe0d7d8829c00e1b",
"username" => "[email protected]",
"password" => "theirpasswordhere",
"grant_type" => "password",
);
$postData = "";
@rossigee
rossigee / cpd-agenttoken-test.php
Last active August 29, 2015 14:16
Obtaining a visitor token with an agent application token
<?php
$application_token = "abcdef12-4855-11e4-a25f-06ee74823f7d";
$url = "https://www.cpd.co.uk/restapi/v1/agents/visitortoken/";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'X-CPD-Token: '.$application_token
));
@rossigee
rossigee / cpd-fetch-property.php
Created February 28, 2015 05:18
Script for checking the details of a property
<?php
$application_token = "abcdef12-4855-11e4-a25f-06ee74823f7d";
# Get a visitor token
$url = "https://www.cpd.co.uk/restapi/v1/agents/visitortoken/";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'X-CPD-Token: '.$application_token
@rossigee
rossigee / index.html
Created May 5, 2015 05:55
Google Maps marker bug demonstration // source http://jsbin.com/vehaju
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Google Maps marker bug demonstration</title>
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
Verifying that +rossigee is my blockchain ID. https://onename.com/rossigee
@rossigee
rossigee / xpub_checker.py
Created July 10, 2017 07:05
Python to fetch Bitcoin addresses/transactions for given XPUB
#!/usr/bin/python
import pycoin.key
import sys
import requests
import json
import datetime
def getbalance(address):
response = requests.get("https://bitaps.com/api/address/%s" % address)

Keybase proof

I hereby claim:

  • I am rossigee on github.
  • I am rossigee (https://keybase.io/rossigee) on keybase.
  • I have a public key ASAz7H_uid51DU7JDgSvttktpS-vN0wuorrhZno17QhWdwo

To claim this, I am signing this object:

#!/usr/bin/python2.7
import os, sys
import requests
import json
import time
projectId = os.environ['RANCHER_ENVIRONMENT']
serviceId = os.environ['RANCHER_SERVICE']
newImage = sys.argv[1]
Verifying my Blockstack ID is secured with the address 1Er18pw9dESfEdsszsq2LVrshDYswArb1n https://explorer.blockstack.org/address/1Er18pw9dESfEdsszsq2LVrshDYswArb1n