Skip to content

Instantly share code, notes, and snippets.

@esquifit
esquifit / append.vim
Created January 24, 2017 12:49 — forked from wellle/append.vim
Commands to append after (and insert before) any text object. http://redd.it/1z93ww
nnoremap <silent> <Leader>a :set opfunc=<SID>Append<CR>g@
nnoremap <silent> <Leader>i :set opfunc=<SID>Insert<CR>g@
fun! s:Append(type,...)
call feedkeys( a:type == 'char' ? "`]a" : "`]o" , 'tn')
endf
fun! s:Insert(type,...)
call feedkeys( a:type == 'char' ? "`[i" : "`[O" , 'tn')
endf

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@esquifit
esquifit / open_folder.ubiq.js
Created May 2, 2010 18:59 — forked from esquifit/open_folder.ubiq.js
Opens Firefox special folder (profile, chrome or installaton folder) For Ubiquity 0.5
function openSpecialFolder(aFolderType) {
var dirService = Components.classes['@mozilla.org/file/directory_service;1']
.getService(Components.interfaces.nsIProperties);
var dir = dirService.get(aFolderType, Components.interfaces.nsIFile);
var iDirectory = getLocalFileInterface(dir.path);
try {
iDirectory.reveal();
} catch (ex) {
// if reveal failed for some reason (eg on unix it's not currently
@esquifit
esquifit / bugmenot.js
Created December 21, 2009 11:10 — forked from vshih/bugmenot.js
ueries bugmenot.com for the current page
/*
bugmenot.js
Queries bugmenot.com for the current page, populates login information and submits.
Written by Victor Shih (vshih at yahoo.com, http://blog.vicshih.com/2009/04/bugmenot-command-for-ubiquity.html)
Initial idea and some code from Onur Yalazı (onur@yalazi.org, http://www.yalazi.org/ubiquity) and Brandon Goldsworthy.
*/
const MIN_RATE_PERCENT = 50; // only show entries that rate 50% or more
@esquifit
esquifit / Userscript_commands.ubiq.js
Created April 25, 2009 19:21 — forked from esquifit/Userscript_commands.ubiq.js
Issue Greasemonkey userscript commands from the Ubiquity command line
var noun_type_gmCommand = {
_name: "GM command name",
// Returns all GM commands available for the current page.
getCommands: function(){
var commands= {};
var menuitems = jQuery(context.chromeWindow.document)
.find('\x23userscript-commands-sb > menupopup > menuitem')
.get();