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 / 0_reuse_code.js
Last active August 29, 2015 14:15
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
@overture8
overture8 / meteor-must-knows.markdown
Last active August 29, 2015 14:09
Meteor - Must knows!
  • Meteor apps, by default, have an insecure package. It's best to keep this in at the start to make development easier but ulltimately this will need to be removed and secure operation need to be added manually.

  • Same with a package called autopublish. This publishs all data up to the clients automatically. Ultimately this needs to be removed and publish/subscribe needs to be managed manually.

  • Meteor Methods can be used to make things more secure. Meteor methods use RPC calls to methods defined on the server. The nice thing is, you also define them on the client. So, when you call a meteor method it executes on the client and the server - the client returns instantly then, once the server returns, if there's a difference, it will patch up the client. (This is latency compensation).

  • As mentioned before, some things are defined on the client, some are defined on the server, and some are defined on the server and the client. It's a bit hard to get you're head around this at the st

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<DTMF async="false">wwwwww1wwwwww6"></DTMF>
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play digits="wwwwww1wwwwww6"></Play>
<Gather action="/url">
<Say loop="1000">Please press 1 for customer information</Say>
</Gather>
</Response>
@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>