First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
#!/usr/bin/env ruby | |
require 'time' | |
require 'logger' | |
require 'rubygems' | |
require 'pingdom-client' | |
require 'active_support/core_ext/numeric/time' # time extensions, e.g., 5.days | |
require 'stashboard' | |
TIME_FORMAT = "%Y-%m-%d %H:%M:%S %Z" # YYYY-MM-DD HH:MM:SS ZZZ |
#!/bin/sh | |
# Sublime Text 3 install with Package Control | |
# http://simonewebdesign.it/blog/install-sublime-text-3-on-fedora-20/ | |
# Run this script with: | |
# $ curl LINK_TO_THIS_SCRIPT | sh | |
curl -o ~/st3.tar.bz2 http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2 |
--- | |
- name: Configure Ansible | |
hosts: guests | |
user: root | |
tasks: | |
- name: Install Ansible | |
action: yum pkg=$item state=installed | |
with_items: |
# Install redis with homebrew :) | |
$ brew install redis | |
# Create a deamon | |
$ sudo vim /Library/LaunchDaemons/io.redis.redis-server.plist | |
# Paste the following content | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
class ApplicationController < ActionController::Base | |
rescue_from ActiveRecord::RecordNotFound, with: :render_not_found | |
def render_not_found | |
respond_to do |format| | |
format.html { render action: "errors/not_found.html.erb", status: 404 } | |
end | |
end | |
end |
$('#cel').mask("(99) 9999-9999?9").live('focusout', function(event) { | |
var target, phone, element; | |
target = (event.currentTarget) ? event.currentTarget : event.srcElement; | |
phone = target.value.replace(/\D/g, ''); | |
element = $(target); | |
element.unmask(); | |
if(phone.length > 10) { | |
element.mask("(99) 99999-999?9"); | |
} else { | |
element.mask("(99) 9999-9999?9"); |
worker_processes 3; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7; | |
passenger_ruby /usr/local/bin/ruby; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.