TL;DR
Create a backup:
pg_dumpall > mybackup.sql
Perform the upgrade:
sudo pg_dropcluster 9.4 main --stop
echo "installing depencies..." | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev nodejs rbenv ImageMagick libmagickwand-dev build-essential postgresql postgresql-common libpq-dev imagemagick nginx libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -y | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
source ~/.bashrc | |
if [ ! -d ~/.rbenv/plugins/ruby-build ]; then git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build; fi | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
source ~/.bashrc | |
rbenv install 2.2.1 -s |
#!upstart | |
#Elixir app is deployed using capistrano v3 | |
#Swap app_name for your application name | |
description "Service Up - app_name" | |
author "Colin Densem <hello@summit360.co.uk>" | |
start on filesystem |
# An implementation to make this code example work: https://tinyurl.com/y7tzjutf | |
class Sig | |
def initialize(param_types) | |
@param_types = param_types | |
end | |
def returns(return_type) | |
@return_type = return_type | |
self |
var bip39 = require("bip39"); | |
var ethwallet = require('ethereumjs-wallet'); | |
var ProviderEngine = require("web3-provider-engine"); | |
var WalletSubprovider = require('web3-provider-engine/subproviders/wallet.js'); | |
var Web3Subprovider = require("web3-provider-engine/subproviders/web3.js"); | |
var Web3 = require("web3"); | |
// Insert raw hex private key here, e.g. using MyEtherWallet | |
var wallet = ethwallet.fromPrivateKey(Buffer.from('abcdef', 'hex')); |
TL;DR
Create a backup:
pg_dumpall > mybackup.sql
Perform the upgrade:
sudo pg_dropcluster 9.4 main --stop
#!/usr/bin/env ruby | |
require 'gosu' # gem install gosu --no-document | |
include Gosu | |
$dimension, $splits = 200, 20 | |
$size = $dimension.to_f / $splits.to_f | |
class Worm | |
attr_writer :dir | |
def initialize() reset end |
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
* Heroku Hostname SSL | |
* GoDaddy Standard SSL Certificate | |
* Zerigo DNS |
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |