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
curl -XDELETE 'http://localhost:9200/p' | |
curl -XPOST 'http://localhost:9200/p' -d ' | |
{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"default_index" : { | |
"tokenizer" : "standard", | |
"filter" : ["lowercase", "asciifolding", "mynGram"], |
Follow the instructions here: https://www.linode.com/wiki/index.php/PV-GRUB#Ubuntu_12.04_Precise
Basically:
apt-get update
apt-get install -y linux-virtual grub-legacy-ec2
# place in ./config/initializers | |
# Usage | |
# LL.warn "blah" | |
# LL.warn @profile.inspect | |
require 'pp' | |
require 'log4r' | |
require 'log4r/configurator' | |
require 'log4r/yamlconfigurator' | |
require 'log4r/outputter/fileoutputter' |
if [[ $BUILD_STATUS == "success" ]] | |
then | |
export STATUS="success" | |
else | |
export STATUS="failure" | |
fi | |
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \ | |
-H "Content-Type: application/json" \ | |
-X POST \ |
On a clean Rails 4 install with Bundler 1.3.0, using --binstubs causes competition between Rails and Bundler for the contents of bin/rails (and bin/rake).
Just running bundle
will rewrite the Rails version of bin/rails to a version that doesn't work.
The fix is to use the new bundle binstubs <gemname>
command.
(see rails/rails#8974)
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"
$('a[data-mixpanel-tracker]').click -> | |
setTimeout (=> window.location.href = $(@).attr('href')), 300 | |
tracker = $(@).attr('data-mixpanel-tracker') | |
properties = JSON.parse($(@).attr('data-mixpanel-properties') || '{}') | |
mixpanel.track tracker, properties | |
return false |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# In config/initializers/local_override.rb: | |
require 'devise/strategies/authenticatable' | |
module Devise | |
module Strategies | |
class LocalOverride < Authenticatable | |
def valid? | |
true | |
end |