Skip to content

Instantly share code, notes, and snippets.

@rnewson
rnewson / jquery.couch.js
Created February 9, 2015 12:14
login from jquery.couch.js
/**
* Authenticate against CouchDB, the <code>options</code> parameter is
*expected to have <code>name</code> and <code>password</code> fields.
* @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
* #post--_session">docs for POST /_session</a>
* @param {ajaxSettings} options
* <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
* jQuery ajax settings</a>
*/
login: function(options) {
@jeffgca
jeffgca / tools-menu-hack.js
Last active December 28, 2015 20:39
Add a menu to Fennec's tools menu (?) - now with a full working example.
const utils = require('sdk/window/utils');
const recent = utils.getMostRecentBrowserWindow();
// Assume NativeWindow is a global
function showToast() {
recent.NativeWindow.toast.show("Showing you a toast", "short");
}
var menuID;
@mihaisucan
mihaisucan / webconsole-output-rewrite.md
Last active December 16, 2015 07:29
Planning for the Firefox Web Console output rewrite/reimplementation. See bug 778766.

Web Console output rewrite plan

This document describes the work we did for the Web Console output rewrite / reimplementation, see bug 778766.

Implementation is mostly complete. We still need to fix up message filtering and grouping.

This document does not accurately reflect the current Web Console output API.

@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?