Skip to content

Instantly share code, notes, and snippets.

View jufemaiz's full-sized avatar
🔌
CTO at @enosi

Joel Courtney jufemaiz

🔌
CTO at @enosi
View GitHub Profile
@jufemaiz
jufemaiz / rails.config
Created July 7, 2014 01:15
.ebextensions/rails.config
files:
# Make the appropriate directories
"/opt/elasticbeanstalk/hooks/appdeploy/pre/020_bootstrap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# /opt/elasticbeanstalk/hooks/appdeploy/pre/01a_bootstrap.sh
@jufemaiz
jufemaiz / page.php
Last active August 29, 2015 14:09 — forked from anonymous/page.html
<?php
$Fname = $_POST["Fname"];
$Lname = $_POST["Lname"];
$gender = $_POST["gender"];
$food = $_POST["food"];
$quote = $_POST["quote"];
$education = $_POST["education"];
$TofD = $_POST["TofD"];
?>
<html>
@jufemaiz
jufemaiz / backup
Last active August 29, 2015 14:18
Backup / Recover PostgreSQL
pg_dump -h {hostname} -U {user-name} -W -v {source_db} -f {postgresql-backup-`date +"%Y%m%d%H%M%S%z"`.sql}
@jufemaiz
jufemaiz / fact-fiction-and-fibre-to-the-node.html
Last active October 16, 2015 01:18
Fact, fiction and fibre to the node
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie10 lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="modern no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 10]><!--> <html class="modern no-js" lang="en"> <!--<![endif]-->
<head>
<script type="text/javascript" src="/static/js/analytics.js"></script>
@jufemaiz
jufemaiz / ausgrid-outages-services.md
Last active October 16, 2015 23:27
Ausgrid Outage Services

Ausgrid Outage Web Services

As per http://www.ausgrid.com.au/services/Outage/Outage.asmx

GetNetworkArea

curl 'http://www.ausgrid.com.au/services/Outage/Outage.asmx/GetNetworkArea' \
-X POST \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Length: 0' \
@jufemaiz
jufemaiz / outage.geojson
Last active October 20, 2015 05:54
GeoJSON testing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jufemaiz
jufemaiz / 1_README.md
Last active January 24, 2017 10:45
Rails + GIT Gems

In order to deal with GIT based gems, you'll need to make add some additional .ebextensions/*.config files.

  1. Support GIT in your EC2 instance;
  2. Backup the existing bundle command
  3. Bootstrap your rails project to add in your vendor directory to the shared environment
  4. Replace your bundle_install with a better bundle_install_deployment approach

Please note that these are placed in your Rails applications .ebextensions folder.

@jufemaiz
jufemaiz / measurement_datum.rb
Created September 21, 2016 09:20
A tale of Upsert issues
class MeasurementDatum
belongs_to :measurement_point
# Schema
# - measurement_point_id, integer
# - recorded_at, datetime
# - value, double
end
@jufemaiz
jufemaiz / network-postcode-data.json
Created October 19, 2016 05:32
Australian Electricity Networks and Postcodes
[
{
"Comments": "Cross over suburb",
"Contact": "131 388",
"DB": "Ausgrid",
"Pcode": "2121",
"Quoting": "Y",
"State": "New South Wales"
},
{
### Keybase proof
I hereby claim:
* I am jufemaiz on github.
* I am jcourtneycozero (https://keybase.io/jcourtneycozero) on keybase.
* I have a public key ASCy3Xmfk_uMgj5PAwT-YPTDIQBEkYJuLAWsV_ybhnuU7Qo
To claim this, I am signing this object: