none
none
# 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| |
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class | |
# https://github.com/plataformatec/simple_form/issues/316 | |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput |
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
#!/usr/bin/ruby1.9.1 -Kw | |
# -*- coding: utf-8 -*- | |
class Edge | |
attr_accessor :src, :dst, :length | |
def initialize(src, dst, length = 1) | |
@src = src | |
@dst = dst | |
@length = length |
Source: http://stackoverflow.com/a/14775172/2033014 | |
Step 1 | |
Create the file /usr/share/applications/sublime-handler.desktop | |
[Desktop Entry] | |
Name=Sublime Text 2 URL Handler | |
GenericName=Text Editor | |
Comment=Handle URL Scheme txmt:// |
[user] | |
name = Mathieu Gagné | |
email = mathieu@motioneleven.com | |
[diff] | |
[color] | |
ui = auto | |
[alias] | |
st = status | |
ci = commit | |
co = checkout |
# Rspec to keep color option | |
alias spec='spec --color --format specdoc' | |
# Rails server | |
alias railss='rails s thin --debugger' | |
alias railsss='sublime -a . ; rails s thin --debugger' | |
alias migrate="rake db:migrate && rake db:migrate RAILS_ENV=test" | |
alias hardreset="rake db:drop && rake db:migrate && rake db:seed && rake db:test:prepare" | |
# bundle |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: spawn-fcgi | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts FastCGI for PHP | |
# Description: starts FastCGI for PHP using start-stop-daemon |
$ 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/ |