Skip to content

Instantly share code, notes, and snippets.

View marfarma's full-sized avatar

Pauli Price marfarma

View GitHub Profile
# 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
@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 / _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 / 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:
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);
};
};
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;
#!/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
@marfarma
marfarma / app.js
Created June 18, 2013 23:15 — forked from twilson63/app.js
var config = require('./config');
var nano = require('nano')(config.db);
var express = require('express');
var async = require("async");
var app = express();
var modelDoc = {
language: "javascript",
views: {
all: {
var fs = require('fs'),
url = require('url');
module.exports = function (rootDir, indexFile) {
indexFile = indexFile || "index.html";
rootDir = rootDir || '';
var rootPart = rootDir.length > 0 ? rootDir + '/' : '';
return function(req, res, next){
var path = url.parse(req.url).pathname;
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <[email protected]>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release