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| |
| $ 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/ |
| /*================================================== | |
| = Bootstrap 3 Media Queries = | |
| ==================================================*/ | |
| /*========== Mobile First Method ==========*/ | |
| /* Custom, iPhone Retina */ | |
| @media only screen and (min-width : 320px) { | |
| } |
| 3 files to add sorting to table headers. |
| 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, '' |
| class Calc | |
| DIGITS = [:zero, :one, :two, :three, :four, :five, :six, :seven, :eight, :nine] | |
| def method_missing method | |
| if DIGITS.include?(method) | |
| DIGITS.index(method) | |
| else | |
| super | |
| end | |
| end |
| div.loading {width:200px; height:200px; position:relative; float:left; margin:0 10px;} | |
| div.one {background:#000;} | |
| div.two {background:#09c;} | |
| div.loading:after {display:block; content:""; | |
| border-radius:2px; | |
| height:2px; width:2px; | |
| position:absolute; | |
| margin:auto; left:0; top:0; right:0; bottom:0; | |
| box-shadow: |
| module Colors | |
| def colorize(text, color_code) | |
| "\033[#{color_code}m#{text}\033[0m" | |
| end | |
| { | |
| :black => 30, | |
| :red => 31, | |
| :green => 32, | |
| :yellow => 33, |
| # 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 |