sudo apt-get update
This file contains hidden or 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
# Edit the file: | |
vim /opt/nginx/conf/nginx.conf | |
server { | |
listen 80; | |
server_name www.example.com; | |
location / { | |
root /home/deploy/www/application/current/public; | |
passenger_enabled on; | |
rails_env production; |
This file contains hidden or 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
Dear friend, | |
Everybody loves beautiful handwritten letters. Here you can write a message to someone special and support a community. They will transcript it for you, with a personal touch. Your letter will be sent, in the real world. | |
P.S.: The best part: the money goes to the community! :) | |
Dear friend, |
This file contains hidden or 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
RAILS_RELATIVE_URL_ROOT=new_site RAILS_ENV=production rake assets:precompile |
This file contains hidden or 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
# MonkeyPatch for Inherited Resources to works with strong parameters and rails 4.0 | |
module InheritedResources | |
module BaseHelpers | |
protected | |
def build_resource | |
get_resource_ivar || set_resource_ivar(end_of_association_chain.send(method_for_build, request.get? ? {} : resource_params)) | |
end | |
def update_resource(object, attributes) | |
object.update_attributes(attributes) |
This file contains hidden or 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
# Devise Views | |
pt-BR: | |
devise: | |
registrations: | |
edit: | |
provider: "Provedor" | |
connect_disconnect: "Conectar/Desconectar" | |
unhappy: "Infeliz?" | |
cancel_my_account: "Cancelar a minha conta" | |
edit_devise_resource: "Editar %{resource_name}" |
This file contains hidden or 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
#= require_self | |
#= require_tree . | |
window.Tasker = | |
Common: | |
initPage: -> | |
# If you're using the Turbolinks and you need run a code only one time, put something here. | |
# if you're not using the turbolinks, there's no difference between init and initPage. | |
# toggle links |
This file contains hidden or 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
Tasker.Projects = {} if Tasker.Projects is undefined | |
Tasker.Projects.Show = -> | |
$('.new-task-button').click -> | |
url = $(this).data('url') | |
$.ajax | |
url: url | |
type: "GET" | |
success: (data)-> | |
$('#newTask .modal-body').html(data) |
This file contains hidden or 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
if has("gui_running") | |
color peacock | |
else | |
color railscasts | |
endif |
This file contains hidden or 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
#!/usr/bin/env ruby | |
file="~/Drive/.gitshots/#{Time.now.to_i}.jpg" | |
unless File.directory?(File.expand_path("../../rebase-merge", __FILE__)) | |
puts "Taking capture into #{file}!" | |
system "imagesnap -q -w 3 #{file} &" | |
end | |
exit |