#Mac OS X
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
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 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
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 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
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
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
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
load 'deploy' | |
load 'deploy/assets' # Assets pipeline for Rails application | |
load 'config/deploy' |
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)
-
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.
-
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
-
Connect PS3 controller to Mac with USB cable.
-
Enable Bluetooth.
View gist:ca78979709c75de9e347
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
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 |
View Vagrantfile
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
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" |
OlderNewer