This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Colors | |
def colorize(text, color_code) | |
"\033[#{color_code}m#{text}\033[0m" | |
end | |
{ | |
:black => 30, | |
:red => 31, | |
:green => 32, | |
:yellow => 33, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 files to add sorting to table headers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Mathieu Gagné | |
email = mathieu@motioneleven.com | |
[diff] | |
[color] | |
ui = auto | |
[alias] | |
st = status | |
ci = commit | |
co = checkout |
OlderNewer