Skip to content

Instantly share code, notes, and snippets.

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head -100
# run Rhino + EnvJS in console:
env-js $ java -cp dist/env-js.jar jline.ConsoleRunner org.mozilla.javascript.tools.envjs.Main
# run Rhino + EnvJS:
env-js $ java -jar dist/env-js.jar -opt -1
// ==UserScript==
// @name Never MAAR!
// @namespace http://plurk.com/garcon
// @description Never mark all as read in Plurk accidentaly.
// @include http://plurk.com/*
// @include http://www.plurk.com/*
// ==/UserScript==
//
// Version: 20100220.01
//
<?php
//
// This compiler is currently in beta status.
// The code is quick and dirty, but it works as far as I know.
// Feedback welcome:
// http://arantius.com/contact.php
//
// Released under GPLv2 license.
//
// http://interval.cz/clanky/pokrocile-zpracovani-udalosti-napric-platformami/
var events = new Object();
events.addListener = function(element,type,fcn)
{
if (!element.addEventListener && !element.attachEvent) return false;
if (element.addEventListener) element.addEventListener(type,fcn,false);
else if (element.attachEvent)
{
mysql -u username -p -h localhost data-base-name < data.sql
@garcon
garcon / DeliciousGoogle.user.js
Created June 13, 2010 21:40
Delicious search results on Google
// ==UserScript==
// @name Delicious Search Results on Google
// @namespace gaillard
// @description Shows results from Delicious on Google search pages
// @include http://www.google.*/search*
// @date 2009-03-07
// @version 0.1
// @GM_version 0.8.20080609.0
//
// 99% of the code for this user script comes form markcarey's userscript 'Twitter Search Results on Google' (http://userscripts.org/scripts/show/43451)
@garcon
garcon / query-string-parser.js
Created October 6, 2010 21:17
Javascript Query String Parser
function ptq(q)
{
/* parse the query */
/* semicolons are nonstandard but we accept them */
var x = q.replace(/;/g, '&').split('&'), i, name, t;
/* q changes from string version of query to object */
for (q={}, i=0; i<x.length; i++)
{
t = x[i].split('=', 2);
name = unescape(t[0]);
@garcon
garcon / jquery.textchange.js
Created November 9, 2010 15:19 — forked from mkelly12/jquery.textchange.js
jQuery Text Change Event
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@garcon
garcon / audio-video-manipulation.md
Last active February 18, 2022 08:04
This is a collection of command line one-liners for manipulating with audio and video files