Skip to content

Instantly share code, notes, and snippets.

View ryanramage's full-sized avatar

Ryan Ramage ryanramage

View GitHub Profile
@ryanramage
ryanramage / log.txt
Last active August 29, 2015 13:59
rcouch build
> git clone https://github.com/apache/couchdb.git
> cd couchdb/
> git checkout -b 1994-merge-rcouch origin/1994-merge-rcouch
> make
> make check
---skipping logs, to around the failures -----
oauth_users_db.js ... testing
oauth_users_db.js ... ok
@ryanramage
ryanramage / gist:9005948
Created February 14, 2014 18:08
Use a minified require, fallback to unminified if not available
<script type="text/javascript">
function load(){
require(['js/app', 'jquery'], function (app, $) {
window.$ = $;
app.initialize();
require(['js/libs/bootstrap'], function(ihatebs){})
});
}
function loadDev(){
console.log('DEVELOPMENT MODE');
@ryanramage
ryanramage / gist:7760588
Created December 2, 2013 22:55
CouchDB creates db after delete, when replication doc exists
{
"_id": "redforms-rwp-6566",
"_rev": "2-bb45ce4405f0d49e329d1f4511ceb142",
"source": "redforms",
"target": "redforms-rwp-6566",
"continuous": true,
"create_target": true,
"doc_ids": [
"_design/redforms"
],
@ryanramage
ryanramage / twitter-links.user.js
Created October 7, 2013 16:33
A chrome/greasemonkey script to replace twitter t.co links with the actual links.
@ryanramage
ryanramage / howto.md
Created May 29, 2013 22:28
Kujua Lite - Hosted security settings.

Kujua Lite - Hosted security settings.

After installing an instance of Kujua-Lite, it is fairly easy to administer access to it. This document will explain how.

Goal

  • To ensure only members of the group 'organizationX' have access to an instance of kujua-lite.
@ryanramage
ryanramage / UMD.js
Last active December 17, 2015 19:19
Make sure you replace FILLME with values.
(function (root, factory) {
if (typeof exports === 'object') {
module.exports = factory( require('FILLME_A'), require('FILLME_B'), require('FILLME_C'));
} else if (typeof define === 'function' && define.amd) {
define(['FILLME_A', 'FILLME_B', 'FILLME_C'],factory);
} else {
root.FILLME_GLOBAL_NAME = factory(root.FILLME_A, root.FILLME_B, root.FILLME_C);
}
}(this, function (FILLME_A, FILLME_B, FILLME_C) {
@ryanramage
ryanramage / live.js
Last active December 17, 2015 16:29
Couchapp Live reload. Simply add <script src="live.js"/> You must have two rewrites defined as follows: { "from": "_db/*" , "to" : "../../*" }, { "from": "_ddoc" , "to" : "" },
(function(){
var currentETag;
onLoad(function pageLoaded() {
console.log('starting live reload');
if (window.EventSource) return eventsource();
else setInterval(polling, 1500);
});
@ryanramage
ryanramage / index.html
Created April 25, 2013 20:27
simple jam based index
<doctype html>
<html>
<div id="thing">
</div>
<script type="text/javascript" src="jam/require.js"></script>
<script type="text/javascript">
require(['jquery'], function($){
$('#thing').html('dsasad')
});
</script>
@ryanramage
ryanramage / command-line.md
Last active December 15, 2015 05:09
Gardener command-line examples

basic format

gardener url

where url is the top level in the couchdb url space to look.

Examples:

@ryanramage
ryanramage / couchdb.rb
Last active December 14, 2015 20:49 — forked from dch/README.md
require 'formula'
class Couchdb < Formula
homepage "http://couchdb.apache.org/"
url 'http://www.apache.org/dyn/closer.cgi?path=/couchdb/1.2.1/apache-couchdb-1.2.1.tar.gz'
sha1 '70dac0304cdc9f4313f524db583170a2c59e265c'
head 'https://git-wip-us.apache.org/repos/asf/couchdb.git'
devel do