Skip to content

Instantly share code, notes, and snippets.

@sbwoodside
sbwoodside / installing_supervisor_macosx.md
Last active July 27, 2017 03:11 — forked from fadhlirahim/installing_supervisor_macosx.md
Setting up supervisord in Mac OS X

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

Keybase proof

I hereby claim:

  • I am sbwoodside on github.
  • I am sbwoodside (https://keybase.io/sbwoodside) on keybase.
  • I have a public key ASCRy_9KiahtdpCEx0kKPmtBu2CmD1vhmd8VXyNWLVX5awo

To claim this, I am signing this object:

require 'acceptance_helper'
include Warden::Test::Helpers
resource "Measurements" do
get "/measurements" do
user = User.first
login_as(user, :scope => :user)
before do
measurement = FactoryGirl.create(:default_measurement, :user_id => user.id)
require 'acceptance_helper'
resource "Measurements" do
fixtures :users
let(:client) { RspecApiDocumentation::RackTestClient.new(self, :headers => { "HTTP_ACCEPT" => "application/json" }) }
post "/users/sign_in" do
let(:email) { "cam@cam.cam" }
let(:password) { "cam@cam.cam" }
// When triggered, adds a small image before other images that represents the full-size image.
// Drag-and-drop it, right-click and save, or click to open.
javascript:$("img.viewImage, img.currentImage, img.space, img[id^=galleryImg], img[class^=browseListImage], .gallery-photo img").each(function() { var newSrc = this.src.replace(/[fs]images\/(\d+).*/, 'simages/$1_0_9-.jpg').replace(/_\d-/,'_16-'); $(this).parents("a").andSelf().first().before("<a href='"+newSrc+"'><img src='"+newSrc+"' width=50></a>") })
#import <Foundation/Foundation.h>
@interface SPInvocationGrabber : NSObject {
id _object;
NSInvocation *_invocation;
int frameCount;
char **frameStrings;
BOOL backgroundAfterForward;
BOOL onMainAfterForward;
BOOL waitUntilDone;
module ActiveRecord::Serialization
def self.from_xml(xml)
the_class = Hash.from_xml(xml).keys.first.singularize.camelize.constantize # singularize does nothing if already singular
array_or_hash = Hash.from_xml(xml).values.first
array_or_hash.class == Array ? array_or_hash.map { |hash| the_class.new( hash ) } : the_class.new( array_or_hash )
end
end