Skip to content

Instantly share code, notes, and snippets.

View mathieugagne's full-sized avatar

Mathieu Gagné mathieugagne

View GitHub Profile
def main
remove_jbuilder
end
def remove_jbuilder
gemfile_lines =
"# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder\n" +
"gem 'jbuilder', '~> 2.0'\n"
gsub_file 'Gemfile', gemfile_lines, ''
@mathieugagne
mathieugagne / _sortable_header
Created April 30, 2014 00:36
Sortable Headers
3 files to add sorting to table headers.
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@mathieugagne
mathieugagne / amd-driver
Last active August 29, 2015 14:01
Open GL driver installation for ATI Radeon HD 7750
$ sudo sh /usr/share/ati/fglrx-uninstall.sh
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
$ sudo rm /etc/X11/xorg.conf
$ sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 xserver-xorg-core
$ sudo dpkg-reconfigure xserver-xorg
$ sudo reboot
$ mkdir ~/catalyst12.4/
$ cd ~/catalyst12.4/
Download the appropriate driver for your machine here from the AMD/ATI Website and move it in ~/catalyst12.4/
@mathieugagne
mathieugagne / distances.rb
Created November 30, 2017 15:44
Distance test to csv
# Setup
question = SurveyQuestion.where(survey_id: 83,
title: 'Distance',
index: 261,
question_type: 'virtual',
type: 'SurveyQuestionDistance',
settings: '{"epicenter_address": "Beauvais, France", "respondent_address_question_id": 7163}').first_or_create
# Add "France" to responses
SurveyResponse.where(survey_question_id: 7163).find_each do |response|
@mathieugagne
mathieugagne / pr_template.md
Created December 21, 2017 19:31
PR Template

Ticket

none

Deployment Tasks

none

Accomplishments