Skip to content

Instantly share code, notes, and snippets.

View overture8's full-sized avatar

Phil McClure overture8

  • Stora
  • Belfast, Northern Ireland
View GitHub Profile
@overture8
overture8 / create_review_app_subdomain.rake
Created November 30, 2021 19:03 — forked from dansteele/create_review_app_subdomain.rake
Use a sub-subdomain on Heroku review apps with DNSimple. Run this task from your app.json in your postdeploy script.
namespace :staging do
desc 'create subdomain DNS record for Heroku review app'
task :publish_dns do
require 'dnsimple'
require 'platform-api'
STAGING_DOMAIN = 'mystagingdomain.com'.freeze
DNSIMPLE_ACCOUNT_ID = .freeze
heroku_app_name = ENV['HEROKU_APP_NAME']
subdomain = heroku_app_name.match(/.*(pr-\d+)/).captures.first
@overture8
overture8 / byrpyt_error.md
Last active January 9, 2018 09:34
Bcrypt NIF Issue

The following error was appearing when making use of bcrypt with the following versions on a Mac.

  • Elixir - 1.5.1
  • Erlang - 20.1
  • bcrypt_elixir - 1.0
        ** (EXIT) an exception was raised:
            ** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3 is undefined (module Bcrypt.Base is not available)
 (bcrypt_elixir) Bcrypt.Base.gensalt_nif([233, 62, 8, 4, 149, 169, 187, 161, 3, 67, 113, 26, 15, 100, 16, 225], 12, 98)
@overture8
overture8 / employee_induction
Created September 9, 2016 14:15
Employee Induction's
* Contact signed
* Access to github repos
* Invite to Slack
* Access to AWS
* Desk
@overture8
overture8 / keybase.md
Created August 9, 2016 21:19
keybase.md

Keybase proof

I hereby claim:

  • I am overture8 on github.
  • I am overture8 (https://keybase.io/overture8) on keybase.
  • I have a public key whose fingerprint is E2AE 4F16 FF5F 8117 06F7 6973 A837 279C 6559 E768

To claim this, I am signing this object:

@overture8
overture8 / cardstream_ruby.rb
Last active May 16, 2016 20:01
Ruby Cardstream Payment Gateway code
require "net/https"
require "uri"
require "cgi"
require "digest"
class Cardstream
def initialize(post_data)
url_params = escape_params(post_data)
@post_data = hash_post_data(url_params)
end
@overture8
overture8 / test.xml
Last active December 29, 2015 12:49
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Hi this is a test</Say>
<Dial record="true">
<Number>+447726000027</Number>
</Dial>
<Say>Connecting User</Say>
</Response>
<Response>
<Speak>Hi, it worked</Speak>
</Response>
<Response>
<DTMF>1</DTMF>
<DTMF>W</DTMF>
<DTMF>W</DTMF>
<DTMF>W</DTMF>
<DTMF>W</DTMF>
<DTMF>W</DTMF>
<DTMF>4</DTMF>
</Response>
<Response>
<Wait length="4" />
<DTMF>1</DTMF>
<Wait length="4" />
<DTMF>3</DTMF>
</Response>
<Response>
<DTMF>1</DTMF>
<Wait length="4" />
<DTMF>3</DTMF>
</Response>