Skip to content

Instantly share code, notes, and snippets.

View rafamoreira's full-sized avatar
:shipit:

Rafael Moreira rafamoreira

:shipit:
View GitHub Profile
@rafamoreira
rafamoreira / gist:3092285
Created July 11, 2012 18:43
A nice way to handle Apache vhosts on OSX
$ mkdir ~/code
$ touch ~/code/apache-settings/httpd-vhosts.conf
$ sudo ln -s ~/code/apache-settings/httpd-vhosts.conf /etc/apache2/other
$ mkdir ~/code/apache-settings/logs
$ chmod 0777 ~/code/apache-settings/logs
#
# Use name-based virtual hosting.
@rafamoreira
rafamoreira / gist:3098659
Created July 12, 2012 15:02
Modelo de Cronjob para backup mensal
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
#m h dom mon dow user command
0 3 1 * * root php /local_script/bk.php
30 3 1 * * root php /local_script/upload.php
@rafamoreira
rafamoreira / gist:3139335
Created July 18, 2012 22:22
Brightness adjust for linux
If the driver of your graphics card supports it, then you can use xrandr.
The following command lists the current configuration:
xrandr --current --verbose
If you want to change the configuration of an output, then you need the name of the output. This name is part of the output of xrandr --current, for example LVDS1.
The brightness can be changed like this:
@rafamoreira
rafamoreira / Quote.pm
Created July 24, 2012 04:01
Quote.pm to work properly the get currency from gnucash
#!/usr/bin/perl -w
#
# Warning: This file has been edited to fix currencies not working because
# the Yahoo page has changed. You should keep an eye out for an official
# fix and use that when it comes out. This file may cause future problems
# keep the old one available.
#
#
# Copyright (C) 1998, Dj Padzensky <[email protected]>
# Copyright (C) 1998, 1999 Linas Vepstas <[email protected]>
@rafamoreira
rafamoreira / Ubuntu rbenv
Created July 24, 2012 23:00 — forked from HatemMahmoud/Ubuntu rbenv
Installing Ruby 1.9.3 with OpenSSL on Ubuntu 12.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@rafamoreira
rafamoreira / gist:3207082
Created July 30, 2012 14:02
Using Ruby via Rbenv at TextMate
1 PATH => Add usr/local/bin: (rbenv installed via homebrew)
ps. This PATH is TextMate PATH
2. TM_RUBY => Set to /Users/user_name/.rbenv/shims/ruby
.highlight { background-color: #ffffcc }
.highlight .c { color: #586E75 } /* Comment */
.highlight .err { color: #93A1A1 } /* Error */
.highlight .g { color: #93A1A1 } /* Generic */
.highlight .k { color: #859900 } /* Keyword */
.highlight .l { color: #93A1A1 } /* Literal */
.highlight .n { color: #93A1A1 } /* Name */
.highlight .o { color: #859900 } /* Operator */
.highlight .x { color: #CB4B16 } /* Other */
.highlight .p { color: #93A1A1 } /* Punctuation */
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'