Skip to content

Instantly share code, notes, and snippets.

View kleerkoat's full-sized avatar

kleerkoat kleerkoat

View GitHub Profile
// Stupid simple bookmarklet function to duplicate the current page in a new window. Boom.
javascript:(function(){window.open(window.location.href)})();
@BenWard
BenWard / pinboard-full.js
Created January 29, 2011 07:47
A smarter bookmarklet for Pinboard.in; wraps selected text in <blockquote> tags, keeps variables out of the global scope, supports filling tags from rel="tag" markup in the page, and titles from hAtom entry titles.
(function() {
// Change `silent` to true to invoke the promptless, self-closing
// version of the bookmarklet.
var silent = false;
var url = location.href;
var title = document.title;
// Look for a single hAtom entry on the page, and iff one is found, extract
// the entry-title in place of the document title:
@p2
p2 / convert.html
Created August 22, 2011 04:29
A bookmarklet that converts inches to cm and feet to m. Can be expanded to convert other units as well. Visit www.ossus.ch/Convert.html, drag the link shown there to your bookmark bar and when you're on a website that needs conversion, click the boomarkle
<h1>Convert Bookmarklet</h1>
<p>A bookmarklet to (currently) convert <b>feet to cm</b> and <b>inches to Meter</b> on any website.</p>
<p>Drag this link to your bookmark bar and click it when you're on a website you want to convert: <a href="javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.ossus.ch/convert.js?'+Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0">Convert</a>
</p>
@ToQoz
ToQoz / snake_to_camel_case.js
Created September 28, 2011 07:54
javascriptでrouwerCamelCaseからsnake_caseに変える
function convertSnakeToCamelCase(str) {
return str.replace(/_([a-z])/g, function(){return RegExp.$1.toUpperCase()});
}
@rmhall
rmhall / itunes_match_tips.txt
Created November 22, 2011 21:08
iTunes Match tips
My iTunes Match Track upgrading and process info:
If you have less than 25,000 tracks:
1. First let iTunes Match do its things and find all possible matches in your library and finish uploading any non-matching tracks.
2. Once its done, make a new Smart Playlist (I made a folder for all my Smart iTunes Match Related Playlists)
Name this one: iCloud-Upgradeable
Criteria:
MATCH ALL:
Bit Rate is less than 256kbps
@JKirchartz
JKirchartz / html5 notepad
Created November 26, 2011 03:28
simple html5 Notepad, saves in localStorage, but you can only have one note at a time.
<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<title>HTML5 notepad app</title>
<meta charset="utf-8">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
html,body{background:#FCFCFC;color:#444;height:100%;width:100%;margin:0;padding:0;}
#notepad{height:98%;width:98%;padding:1%;font-size:100%;line-height:125%;font-family:san-serif}
::selection{background:#7D7}
::-moz-selection{background:#7D7}
@adamjforster
adamjforster / slugify.js
Created March 6, 2012 18:16
A function to slugify a string in JavaScript.
function slugify(value) {
/**
* Convert to lowercase, remove non-alphanumeric characters and replace
* whitespace with hyphens.
*
* Inspired by Django's slugify function.
*/
value = value.toLowerCase().trim();
value = value.replace(/[^\w\s\-]/g, '');
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@ChewingPencils
ChewingPencils / drafts_bookmarklets
Created May 2, 2012 19:02
Bookmarklets for Drafts App
/*
Drafts App Bookmarklets (http://agiletortoise.com/drafts)
Author: Sean Korzdorfer
Date: 14:01:43 Wed May 02 2012
Nota Bene: It's probably best to have the bookmarklet create a script tag that includes an external JS.
See: https://gist.github.com/2777049
Sends the current Mobile Safari Tab to Drafts app as Markdown link with date and time stamps
@ttscoff
ttscoff / brettquix.txt
Created May 23, 2012 02:32
Brett's Quix File
@Brett's searches
@Brett's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
b https://duckduckgo.com/?q=%21%s Bang search (DuckDuckGo)
grep https://www.cueup.com/?q=%s&fq=1 Greplin
ss https://duckduckgo.com/site:%d%20%s Current site (DuckDuckGo)
bt https://duckduckgo.com/site:brettterpstra.com%20%s BrettTerpstra.com (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
hints http://hints.macworld.com/search.php?query=%s&keyType=all&datestart=&dateend=&topic=0&type=stories&results=50&mode=search Search Mac OS X Hints
mu http://www.macupdate.com/find/mac/%s Search MacUpdate (Software)