Based on http://www.chow.com/recipes/30356-easy-slow-cooker-pulled-pork
3kg pork shoulder, (perhaps 2.5kg after fat/skin trimmed)
Place in the slow cooker:
- 3 medium brown onions, thinly sliced
- 1 tbsp minced garlic
- 1.5 cups chicken stock
class MyJob < ActiveJob::Base | |
queue_as :urgent | |
rescue_from(NoResultsError) do | |
retry_job wait: 5.minutes, queue: :default | |
end | |
def perform(*args) | |
MyService.call(*args) | |
end |
#!/bin/bash | |
branch_name=$(git symbolic-ref --short HEAD) | |
if [ "$branch_name" == 'dev' ] || [ "$branch_name" == 'staging' ] | |
then | |
git commit --allow-empty -m 'empty commit to trigger deployment' | |
fi |
#!/bin/sh | |
# | |
# This pre-commit hook looks for `fdescribe`, `fcontext`, `fit`, `fspecify` and `fexample` in the | |
# staged files and exits with an error code of 1 if there are such changes. | |
# | |
STATUS=0 | |
DESCRIBEFILES=$(git diff --staged -G"^\s*fdescribe\(" --name-only | wc -l) | |
if [ $DESCRIBEFILES -gt 0 ] |
#!/bin/bash | |
# remove existing 9.3 installation | |
sudo /etc/init.d/postgresql stop | |
sudo apt-get --force-yes -fuy remove --purge postgresql postgresql-9.1 postgresql-client | |
# install 9.4 | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.4' | |
sudo apt-get update |
Based on http://www.chow.com/recipes/30356-easy-slow-cooker-pulled-pork
3kg pork shoulder, (perhaps 2.5kg after fat/skin trimmed)
Place in the slow cooker:
/* global require, phantom */ | |
(function () { | |
'use strict'; | |
var exec, system, env; | |
exec = require('child_process').spawn; | |
system = require('system'); | |
env = system.env.NODE_ENV || system.env.RACK_ENV || 'development'; | |
phantom.onError = function (message, trace) { | |
// dont report for development | |
if (env === 'development') { |
Web applications need understand what permissions are granted to a current user in two key areas.
403
when trying to access a resource outside of one's graph)Further, in many applications in the wild (for better, or worse, perhaps I need new friends and colleagues) I've seen ways implementd to nerf or flat-out disable authorisation controls. In addition to the regular graph-based authorisation flow, the concept of super users is prevelant, and dangerous.
{ | |
"builders": [{ | |
"type": "amazon-ebs", | |
"access_key": "", | |
"secret_key": "", | |
"region": "us-east-1", | |
"source_ami": "ami-de0d9eb7", | |
"instance_type": "m1.large", | |
"ssh_username": "ubuntu", | |
"ami_name": "packer-jenkins {{.CreateTime}}" |
.run(['$cookies', 'user', 'forge', function($cookies, user, forge){ | |
//Check for cookies. | |
var token = $cookies["X-Shrug-Token"]; | |
if( token ) { | |
forge.sessions.get({id: token}, | |
function success(data) { | |
user.login(data); | |
}, | |
function error() { |
package main | |
import ( | |
"database/sql" | |
"errors" | |
"fmt" | |
_ "github.com/bmizerany/pq" | |
"os" | |
"regexp" | |
"strings" |