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
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Colin's Questions</title>
<meta name="description" content="">
@jufemaiz
jufemaiz / histogram_table_timeofday.js
Created August 14, 2013 01:49
Inserts a table based histogram of time data from an object data of structure { 'time_of_day':value }
// Inserts a table based histogram of time data from an object data of structure { 'time_of_day':value }
// @param data[Object] Time of day data object data of structure { 'time_of_day':value }
// @param string|node Node to append to
// @return jQuery[Object] the table's jquery object.
function histogram_table_timeofday(data,parentNode) {
var le_table = $('<table id="histogram" style="width: 100%"><thead><tr><th scope="col" style="width: 40px;">Time of Day</th><th scope="col">Count</th></thead><tbody></tbody></table>');
var max = 0;
for(var key in data) {
if(data[key] > max) { max = data[key]; }
}
$("ol.stream-items").bind("DOMSubtreeModified", function() {
alert('Subtree modified');
$('li.stream-item').each(
function(i,el){
if( undefined !== $(el).children('.tweet').attr('data-retweeter') ) {
$(el).css('display','none').addClass('retweet-quiet');
}
}
);
});
@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 / 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.

### 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:
@jufemaiz
jufemaiz / envvars
Created May 8, 2014 01:58
AWS EC2 Elastic Beanstalk Instance (Ruby Puma)
# /opt/elasticbeanstalk/containerfiles/envvars
# Default environment variables for Elastic Beanstalk
export EB_ROOT=/opt/elasticbeanstalk
export EB_CONFIG_FILE=$EB_ROOT/deploy/configuration/containerconfiguration
export EB_CONFIG_SOURCE_BUNDLE=$EB_ROOT/deploy/appsource/source_bundle
export EB_CONFIG_APP_BASE=/var/app
export EB_CONFIG_APP_SUPPORT=$EB_CONFIG_APP_BASE/containerfiles
export EB_CONFIG_APP_ONDECK=$EB_CONFIG_APP_BASE/ondeck
export EB_CONFIG_APP_CURRENT=$EB_CONFIG_APP_BASE/current
@jufemaiz
jufemaiz / law-enforcement-access-mhr-data.md
Last active July 26, 2018 11:42
APH LIBRARY – LAW ENFORCEMENT ACCESS MHR DATA

Law enforcement access to My Health Record data

Note: This FlagPost was originally published on 24 July 2018. It has since been amended to reference the provisions of the Privacy Act 1988 relevant to the release of health information by private medical practitioners. As an adjunct task, it has also been updated to reflect developments since its original publication. The Library is committed to providing the highest quality information and analysis to the Parliament and always welcomes feedback on its work.

My Health Record (MHR) was introduced in June 2012 by the Gillard Labor Government originally as an opt-in system known as the Personally Controlled Electronic Health Record (PCEHR) before legislative amendments in 2015 introduced by the Abbott Coalition Government renamed it and laid the groundwork for it to become an opt-out system. Law enfo