TL;DR
Install Postgres 9.5, and then:
export LC_CTYPE=en_US.UTF-8; export LC_ALL=en_US.UTF-8
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
TL;DR
Install Postgres 9.5, and then:
export LC_CTYPE=en_US.UTF-8; export LC_ALL=en_US.UTF-8
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
{ | |
"ActiveAdmin Form": { | |
"prefix": "admin_form", | |
"body": [ | |
"form do |f|", | |
"\tf.inputs \"Details\" do", | |
"\t\tf.input :$1", | |
"\tend", | |
"\tf.actions", | |
"end" |
require "rails_helper" | |
describe "Select 2", type: :feature do | |
def create_invoice_with_categories | |
Category.where(name: "Cat #1", description: "Desc 1").first_or_create! | |
cat = Category.where(name: "Cat #2", description: "Desc 2").first_or_create! | |
Invoice.first_or_create!(category: cat) | |
end | |
def create_invoice_with_city |
socat -d TCP-LISTEN:2376,range=127.0.0.1/32,reuseaddr,fork UNIX:/var/run/docker.sock | |
curl localhost:2376/version |
set :mailman_cmd, -> { "#{fetch(:bundle_cmd, 'bundle')} exec mailman" } | |
set :mailman_config, -> { "#{current_path}/config/mailman.rb" } | |
set :mailman_role, -> { :app } | |
set :mailman_pid, -> { "#{current_path}/tmp/pids/mailman.pid" } | |
namespace :mailman do | |
desc 'Stop mailman' | |
task :stop do | |
on roles(:app) do | |
execute "if [ -d #{current_path} ] && [ -f #{fetch(:mailman_pid)} ] && kill -0 `cat #{fetch(:mailman_pid)}` > /dev/null 2>&1; then cd #{current_path} && rm #{fetch(:mailman_pid)} ; else echo 'Mailman is not running'; fi" |
'.source.ruby': | |
'Service': | |
'prefix': 'service' | |
'body': """ | |
class ${1:ServiceName} | |
attr_reader :${2:param} | |
def initialize(${2:param}) | |
@${2:param} = ${2:param} | |
end |
angular.module("utils") | |
.factory("PushNotifications", function($cordovaPush, $rootScope){ | |
var msgCallback; | |
var regCallback; | |
var errorCallback; | |
var gcmSenderId; | |
var service = { | |
setGcmSenderId: setGcmSenderId, |
let g:rails_projections = { | |
\ "config/projections.json": { | |
\ "command": "projections" | |
\ }, | |
\ "app/services/*.rb": { | |
\ "command": "service", | |
\ "affinity": "model", | |
\ "test": "spec/services/%s_spec.rb", | |
\ "related": "app/models/%s.rb", | |
\ "template": "class %S\n\n def run\n end\nend" |
/** | |
* WkHtmlToPdf table splitting hack. | |
* | |
* Script to automatically split multiple-pages-spanning HTML tables for PDF | |
* generation using webkit. | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's | |
* page format. | |
* The tables you want to be automatically splitted when the page ends must | |
* have a class name of "splitForPrint" (can be changed). |
#!/bin/sh | |
# Use socat to proxy git through an HTTP CONNECT firewall. | |
# Useful if you are trying to clone git:// from inside a company. | |
# Requires that the proxy allows CONNECT to port 9418. | |
# | |
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run | |
# chmod +x gitproxy | |
# git config --global core.gitproxy gitproxy | |
# | |
# More details at http://tinyurl.com/8xvpny |