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 / HTML5_menuitems.us.js
Created January 12, 2012 20:18
Test HTML5 menuitems from within Greasemonkey
// ==UserScript==
// @name Test menuitems in HTML5
// @namespace http://esquifit.myopenid.com
// @description Test menuitems in HTML5
// @include *
// ==/UserScript==
// After a suggestion from Johan Sundström in the Greasemonkey Dev list:
// https://groups.google.com/d/msg/greasemonkey-dev/gLiizYy8VOo/q3_L5HejevsJ
@esquifit
esquifit / tabbar_at_bottom.uc.js
Created December 24, 2011 14:50
Tabbar at the bottom of the main content - for Firefox 4+
/*==uc/==
@name Tabbar at the bottom
@author esquifit
@description In FF4+ places tabbar at the bottom of the main content
@include main
@compatibility Firefox 4.0+
@version 2011-08-28
==/uc==*/
// This code is shamelessly stolen from Tab Mix Plus:
@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 / qr_code.ubiq.js
Created May 2, 2010 12:19
Inserts an QRCode image of the selection
CmdUtils.CreateCommand({
name: "qr_code",
homepage: "http://yonen.ca/",
author: { name: "Jessy Ouellette", email: "jessy.ouellette@gmail.com"},
takes: {"text": noun_arb_text},
_getQRCodeUrl: function(QRText) {
var QRCodeUrl = "http://qrcode.kaywa.com/code/";
return QRCodeUrl + QRText.text;
@esquifit
esquifit / editfile.jetpack.js
Created January 15, 2010 22:29
Open "file:///" url in editor
/*
* Open file:/// url in editor
*
* This jetpack adds an option 'Open in editor' to the context menu of the location bar
* when a local file is loaded into Firefox. The path to the editor can be maintained
* as a jetpack setting. To set it to your editor of choice proceed as follows:
* 1) in about:jetpack select 'installed features'
* 2) click on 'settings' next to the feature name
* 3) restart Firefox for the setting to take effect
*
@esquifit
esquifit / artechock_extended_info.user.js
Created December 27, 2009 16:22
Artechock: Displays Country, Year and Duration of each movie
// ==UserScript==
// @name Artechock: Extended Info
// @namespace http://esquifit.myopenid.com/
// @description Displays Country, Year and Duration of each movie
// @include http://www.artechock.de/film/muenchen/index*
// @include http://www.artechock.de/film/muenchen/film*
// @include http://www.artechock.de/film/muenchen/oton*
// @include http://www.artechock.de/film/bg/film.htm
// ==/UserScript==
@esquifit
esquifit / open_folder.ubiq.js
Created December 22, 2009 21:19
Opens Firefox special folder (profile, chrome or installaton folder) For Ubiquity 0.1.9
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