Skip to content

Instantly share code, notes, and snippets.

Avatar
🌱
Seeding the future!

Jean Brito jeanfbrito

🌱
Seeding the future!
View GitHub Profile
@jeanfbrito
jeanfbrito / gist:3986158
Created October 31, 2012 09:51
Clean Install – Mountain Lion OS X 10.8 DP3
@jeanfbrito
jeanfbrito / server.md
Last active September 30, 2018 18:18 — forked from josemarluedke/server.md
Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano
View server.md

Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano

Update the system

sudo apt-get update

Install some dependencies

View gist:5192547
class Task < ActiveRecord::Base
extend Enumerize
has_ancestry
attr_accessible :title, :description, :parent_id, :project_id
enumerize :status, in: [:created, :working, :waiting, :paused, :stopped, :finished]
belongs_to :project
View gist:5193106
class Task < ActiveRecord::Base
extend Enumerize
has_ancestry
attr_accessible :title, :description, :parent_id, :project_id, :status
enumerize :status, in: {
:created => 0,
:working => 1,
View gist:5392113
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)
View Capfile
load 'deploy'
load 'deploy/assets' # Assets pipeline for Rails application
load 'config/deploy'
@jeanfbrito
jeanfbrito / server.md
Last active December 19, 2015 00:18
Ubuntu with Nginx + Ruby 2.0.0 + PostgreSQL 9.2 + Passenger + Papistrano
View server.md

Ubuntu with Nginx + Ruby 2.0.0 + PostgreSQL 9.1 + Passenger + Papistrano

Update the system

sudo apt-get update

Install some dependencies

View gist:6393674

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@jeanfbrito
jeanfbrito / gist:ca78979709c75de9e347
Created May 14, 2014 05:20
Setting up a Digital Ocean Droplet (VPS) on Ubuntu with Rails, Nginx, Unicorn, Postgres, Redis and Capistrano
View gist:ca78979709c75de9e347
http://www.andrewgertig.com/2013/11/setting-up-a-digital-ocean-droplet-vps-on-ubuntu-with-rails-nginx-unicorn-postgres-redis-and-capistrano
Setting up a Digital Ocean Droplet (VPS) on Ubuntu with Rails, Nginx, Unicorn, Postgres, Redis and Capistrano
November 16, 2013
Create a Droplet on Digital Ocean
I stuck with the defaults:
Size
512MB / 1 CPU
20GB SSD
@jeanfbrito
jeanfbrito / Vagrantfile
Last active November 9, 2015 17:46
Vagrantfile for Windows
View Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hellobits"
config.vm.box_url = "file:///d:/vagrant/hellobits-trusty64-virtualbox.box"
config.vm.network :forwarded_port, guest: 3000, host: 3000
end
VAGRANTFILE_API_VERSION = "2"