Skip to content

Instantly share code, notes, and snippets.

View marfarma's full-sized avatar

Pauli Price marfarma

View GitHub Profile
#!/bin/bash
# This is a simple build script and will be executed on your CI system if
# available. Otherwise it will execute while your application is stopped
# before the deploy step. This script gets executed directly, so it
# could be python, php, ruby, etc.
tarball="https://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz"
# Set GOROOT since we don't use GOROOT_FINAL
mkdir -p $OPENSHIFT_HOMEDIR/app-root/data/go
using ServiceStack.WebHost.Endpoints;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security;
using ServiceStack.Common.Web;
using ServiceStack.Logging;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
var genSignedParamString = function(userID, secret, cmd, params) {
params.userid = userID;
params.command = cmd;
var paramKeys = [];
for(var key in params) {
if(params.hasOwnProperty(key)){
paramKeys.push(key);
};
};
@marfarma
marfarma / monit.conf
Created June 8, 2012 18:15 — forked from shapeshed/monit.conf
Upstart script for monit on Ubuntu 10.04
# This is an event.d (upstart) script to keep monit running.
# To install disable the old way of doing things:
#
# /etc/init.d/monit stop && update-rc.d -f monit remove
#
# then put this script here:
#
# /etc/init/monit.conf
#
# and reload upstart configuration:
@marfarma
marfarma / _html5boilerplate.css.sass
Created January 22, 2012 09:32 — forked from richardvenneman/_html5boilerplate.css.sass
HTML5 Boilerplate HAML & SASS
/*
* HTML5 ✰ Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
@marfarma
marfarma / deploy.rb
Created January 5, 2012 22:49 — forked from tomislav/deploy.rb
Capistrano recipe for Wordpress
default_run_options[:pty] = true
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
require 'capistrano'
require 'rubygems'
require 'railsless-deploy'
set :application, "vault42.org"
set :deploy_to, "/usr/local/www/#{application}"
set :backup_dir, "/home/tomislav/backup"
set :use_sudo, false
@marfarma
marfarma / gist:1083360
Created July 14, 2011 20:28
live headers from a download that lost it's filename = FF 4.0.1 on Mac OS X 10.5 (filename on disk: 444)
http://medialoot.com/main/freebie/444/
GET /main/freebie/444/ HTTP/1.1
Host: medialoot.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
# You can override these if you want in environment initializers:
COUCHDB_HOST = 'http://127.0.0.1:5984' unless defined?(COUCHDB_HOST)
COUCHDB_DB_NAME = "learnhub_#{Rails.env}" unless defined?(COUCHDB_DB_NAME)
# This stuff should stay here:
COUCHDB_SERVER = CouchRest.new(COUCHDB_HOST)
COUCHDB_DATABASE = COUCHDB_SERVER.database!(COUCHDB_DB_NAME)
CouchRest::Model.default_database = COUCHDB_DATABASE
Added
log = File.new("name_of_my_test.log", "w")
STDOUT.reopen(log)
STDERR.reopen(log)
at the top of features/support/env.rb and got the following. Need to figure out where to put it to actually get the error message, as stderr & stdout seems to have been 'swallowed' by rake.
$ rake features --trace
(in /home/deploy/www/www.example.com/app/ccc)