Skip to content

Instantly share code, notes, and snippets.

// ==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
//
# 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
history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head -100
<!-- Customized Google Analytics tracking code by H1.cz - ver. 4.03 rev. 20091130 -->
<script type="text/javascript" src="/ga-set.js"></script>
<script type="text/javascript">
// <![CDATA[
var pageTracker = _ga._getTracker('UA-xxxxxx-xx');
pageTracker._trackPageview();
// ]]>
</script>
@garcon
garcon / ga.js
Created November 30, 2009 18:22
/** Original Google Analytics Tracking Code
* prettyfied by http://www.prettyprinter.de/
* 2009-11-30
*/
(function(){
var aa = "_gat", s = "_gaq", v = true, w = false, x = undefined, ba = "4.5.9", z = "length", A = "cookie", C = "location", D = "&", E = "=", F = "__utma=", H = "__utmb=", I = "__utmc=", ca = "__utmk=", K = "__utmv=", L = "__utmz=", M = "__utmx=", da = "GASO=";
var N = function(f) {
return x == f || "-" == f || "" == f
},
{
km: "medium", // cpc
ks: "source", // adwords
kc: "campaign", // vanoce2009
kk: "keyword", // {keyword}
kv: "ad variation", // {creativeid}
kn: "no override" // campaign group id
}
@garcon
garcon / Sparkline.js
Created November 20, 2009 20:40
Sparkline.js
/**
* Javascript Sparklines Library
* Written By John Resig
* http://ejohn.org/projects/jspark/
*
* This work is tri-licensed under the MPL, GPL, and LGPL:
* http://www.mozilla.org/MPL/
*
* To use, place your data points within your HTML, like so:
* <span class="sparkline">10,8,20,5...</span>
@garcon
garcon / PrettyDate.js
Created November 20, 2009 20:32
PrettyDate.js – dates in a "pretty" way
/*
* JavaScript Pretty Date
* Copyright (c) 2008 John Resig (jquery.com)
* Licensed under the MIT license.
* http://ejohn.org/files/pretty.js
*/
// Takes an ISO time and returns a string representing how
// long ago the date represents.
function prettyDate(time){
@garcon
garcon / ga-h1-setup.js
Created November 16, 2009 21:05
Analytics: H1 – měřicí kód GA podle H1
/**
* Customized Google Analytics tracking code by H1.cz
* Version 4.03
*
* Copyright (c) 2008-2009 H1.cz s.r.o.
* For further information see http://www.h1.cz/ga
*/
if(typeof(_gat) == 'undefined') {
document.write(unescape('%3Cscript src="http'+(document.location.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com/ga.js" type="text/javascript"%3E%3C/script%3E'))
@garcon
garcon / SEOPositionPlus.js
Created November 16, 2009 20:22 — forked from andyed/SEOPositionPlus.js
Analytics – pozice vyhledavačů podle andyed
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the