Skip to content

Instantly share code, notes, and snippets.

View jonathanhoskin's full-sized avatar

Jono Hoskin jonathanhoskin

  • Auckland, New Zealand
View GitHub Profile
@jonathanhoskin
jonathanhoskin / reboot-modem.js
Last active September 29, 2021 13:34
Huawei B315 Modem Reboot Script
// PhantomJS script to reboot a Huawei B315 modem
//
// Author: Jonathan Hoskin / 2017-09-02
// Twitter: @jhossnz
// Github: https://github.com/jonathanhoskin
//
// Requires PhantomJS ~ 2.1.1
//
// Enter your own modem details here
var username = 'admin';
@jonathanhoskin
jonathanhoskin / 1.4.1.md
Created July 6, 2016 21:59
Drupal release v1.4.1

IVHQ Drupal 1.4.1

Changes

  • Updates to the quiz feature #SP1945 / @Ellen
  • Added the Social icons to the page footer #SP2270 / #ZD15 / @George
  • Renamed Bali to Bali - Ubud #SP2307 / #ZD2 / @Jordan
  • Added the new Bali - Lovina destination #SP2307 / #ZD2 / @Jordan
  • Fixes the Z-index of the MyIVHQ user page drop-down selector #SP2327 / #ZD12 / @Sudsy
  • Fixes the Z-index of the online training module, so that it isn't hidden behind the top nav #SP2328 / [#ZD14](https://volunteerhq.ze
@jonathanhoskin
jonathanhoskin / heatpump.xml
Created July 11, 2014 23:07
Mitsubishi Heat Pump WiFi Adaptor POST XML
<COMMAND>
<CMDTYPE>request</CMDTYPE>
<UPLOAD>
<CERTIFICATION>
<MAC>HIDDEN</MAC>
<IP>HIDDEN</IP>
<SERIAL>HIDDEN</SERIAL>
</CERTIFICATION>
<COMMINFO>
<REASON>NORMAL</REASON>
@jonathanhoskin
jonathanhoskin / schema.xml
Last active December 16, 2015 02:08
Sunspot Solr 4 XML
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@jonathanhoskin
jonathanhoskin / vwork_api_compression.vb
Created February 20, 2013 04:19
vWorkApp API Compression .Net Example
Imports System.IO.Compression 'required import to reference the gzipstream in .net
Private Function getWorkerList(ByRef xnodRoot As XmlNode) As Boolean
Dim strURL = "http://api.vworkapp.com/2.0/workers.xml?api_key=" & APIKEY
' WriteLog("URL TO POST: " + strPostURL)
Dim answer = False
Dim requestStream As Stream = Nothing
@jonathanhoskin
jonathanhoskin / brew_git_clean_install.sh
Created October 21, 2012 04:40
Brew Git Clean Install
#!/bin/bash -e
brew rm -f git
brew cleanup
brew prune
brew install git
@jonathanhoskin
jonathanhoskin / console.log
Created February 2, 2012 11:30
database.yml error when installing from Mongo/Devise Rails template
generate mongoid:config
Mongoid config not found. Create a config file at: config/mongoid.yml
to generate one run: rails generate mongoid:config
create config/mongoid.yml
remove config/database.yml
action_mailer ActionMailer recipe running 'after bundler'
gsub config/environments/development.rb
gsub config/environments/development.rb
@jonathanhoskin
jonathanhoskin / install-pygtk.sh
Created November 3, 2011 02:36 — forked from ches/install-pygtk.sh
Install PyGTK via Homebrew and virtualenv
# This LOOKS pretty straightforward, but it took awhile to sort out issues with
# py2cairo and pygobject, so I hope I've saved you some time :-)
#
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow
# -- see https://gist.github.com/771394 if you need advice on getting there.
# There are some optional dependencies omitted, so if you're going to be doing
# heavy development with these libs, you may want to look into them.
#
# We go to some configure option pains to avoid polluting the system-level
# Python, and `brew link`ing Cairo which is keg-only by default.
#!/bin/bash
# MYTHCUTKEY Version 0.1
# This script cuts myth recordings at key frames using the MythTV seek table.
# Why? No external programs required, lossless and fast.
# Updates the myth database with sql calls including rebuilding the seek table.
# Output files may NOT be easily editable again and may have glitches at cut points.
#
# Undo option allows restoration of original recording and associated database
# records including seek table and markup table.