Skip to content

Instantly share code, notes, and snippets.

@cou929
cou929 / load-external-script-snippet.js
Created September 20, 2010 14:41
Simple code snippet for loading external script from a bookmarklet.
/**
* load-external-script-snippet.js
* Kosei Moriyama <[email protected]>
*
* Simple code snippet for loading external script from a bookmarklet.
* Replace example url of script to your target script url before use.
*/
(function() {
var u = 'http://example.com/bookmarklet.js';
@heavensrevenge
heavensrevenge / gist:712735
Created November 23, 2010 23:09
Bookmarklets
javascript:function tinycc_bookmarklet(){var script=document.createElement('script');script.src='http://tiny.cc/public/javascript/bookmarklet.js';scriptObj=document.body.appendChild(script);}tinycc_bookmarklet();
javascript:void(window.open('http://3.ly/?bm=1&u='+encodeURIComponent(location.href)))
javascript:(function(){var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://identi.ca//index.php?action=bookmarklet',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%E2%80%9C'+((e(s))?e(s):e(document.title))+'%E2%80%9D%20%E2%80%94%20'+e(l.href);function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=450,height=200')){l.href=g;}}a();})()
javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.
@laander
laander / hosted-bookmarklet.jquery.js
Created December 22, 2010 00:09
A nifty tool for creating hosted javascript browser bookmarklets supporting jQuery
/**
* Hosted jQuery Bookmarklet
* @description A nifty tool for creating hosted javascript browser bookmarklets supporting jQuery
* @author Laander (http://laander.com) at Konscript (http://konscript.com)
* @gist https://gist.github.com/gists/750857
*/
/**
* Usage:
* The following snippet should be the link saved as a bookmarklet by the user.
@passbe
passbe / jquery-conflict-hack.js
Created July 5, 2011 22:33
JavaScript hack to intercept jQuery and stop it being included.
jQuery.noConflict = function() { return $; };
var h = document.getElementsByTagName('head').item(0);
h.appendChild = function(w) {
return function(obj) {
if (obj.src && !obj.src.match(/jquery-\d\.\d\.\d\.min\.js/gi)) {
w.apply(this, arguments);
}
}
}(h.appendChild);
@notmasteryet
notmasteryet / debug.js
Created January 18, 2012 03:15
pdf.js font instrumentation
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
// save the file as '<pdf.js>/font~/debug.js'
// bookmarklet -> javascript:(function(){if(window.fontDebugScript)%20return;%20var%20script%20=%20window.fontDebugScript%20=%20document.createElement('script');script.setAttribute('src',%20'../font~/debug.js');document.body.appendChild(script);})();
'use strict';
(function fontDebug() {
var fonts;
@hugueslamy
hugueslamy / jqueryinfirebug.js
Created March 6, 2012 22:34
Load JQuery from Firebug console
j=document.createElement("SCRIPT");
j.src="http://code.jquery.com/jquery-latest.pack.js";
document.getElementsByTagName("HEAD")[0].appendChild(j);
@czerasz
czerasz / autossh.c
Last active July 25, 2016 01:58
useful commands
// Compile with
// gcc -o /etc/bin/autossh autossh.c
#include <stdio.h>
int main(int argc, char *argv[]) {
while(1) {
sleep(60);
printf(".\n");
}
}
@niflostancu
niflostancu / wkhtmltopdf.tablesplit.js
Last active February 1, 2024 17:28
WkHtmlToPdf Table Splitting Hack
/**
* WkHtmlToPdf table splitting hack.
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).
@tjluoma
tjluoma / search-in-1password
Last active August 23, 2017 01:00
Bookmarklet to open a JavaScript prompt, pre-filled with the current domain, and then send it to 1Password for iOS 4.1
javascript:str=window.location.hostname;n=str.split(".");l=n.length;op=window.prompt('Search in 1Password',n[(l-2)]+"."+n[(l-1)]);if(op!=null){window.location='onepassword://search/'+op;}
@jdkanani
jdkanani / notepad.html
Last active August 31, 2025 09:37 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`