Skip to content

Instantly share code, notes, and snippets.

View theshaun's full-sized avatar
:shipit:

Shaun Walker theshaun

:shipit:
View GitHub Profile
@theshaun
theshaun / ttn-otaa
Created September 28, 2017 23:45
ttn-otaa aus example
/*******************************************************************************
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
*
* Permission is hereby granted, free of charge, to anyone
* obtaining a copy of this document and accompanying files,
* to do whatever they want with them without any restriction,
* including, but not limited to, copying, modification and redistribution.
* NO WARRANTY OF ANY KIND IS PROVIDED.
*
* This example sends a valid LoRaWAN packet with payload "Hello,
@theshaun
theshaun / hooks_controller.rb
Created March 31, 2016 12:03 — forked from ryansch/hooks_controller.rb
Rails Controller for Chargify Webhooks with support for HMAC-SHA-256 signatures and all current possible events
class Chargify::HooksController < ApplicationController
protect_from_forgery :except => :dispatch_handler
before_filter :verify, :only => :dispatch_handler
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change subscription_card_update expiring_card customer_update component_allocation_change metered_usage upcoming_renewal_notice end_of_trial_notice statement_closed statement_settled upgrade_downgrade_success upgrade_downgrade_failure refund_success refund_failure expiration_date_change ].freeze
SHARED_KEY = 'Chargify Shared Key Here'
def dispatch_handler
event = params[:event]

Keybase proof

I hereby claim:

  • I am theshaun on github.
  • I am shaun (https://keybase.io/shaun) on keybase.
  • I have a public key whose fingerprint is 90FE A9BE F532 0B91 E4C2 5633 7079 3DB4 35F2 CE29

To claim this, I am signing this object:

<?php
// Who you want to recieve the emails from the form.
$sendto = 'andrewrichardgale@gmail.com';
// The subject you'll see in your inbox
$subject = 'A message from Syndicate site';
// Message for the user when he/she doesn't fill in the form correctly.
$errormessage = 'Looks like you are missing some info. Try again.';
@theshaun
theshaun / 0_reuse_code.js
Created September 28, 2013 12:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console