Skip to content

Instantly share code, notes, and snippets.

View ginader's full-sized avatar

Dirk Ginader ginader

View GitHub Profile
@paulirish
paulirish / data-markdown.user.js
Last active October 22, 2024 14:19
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@nimbupani
nimbupani / HTML language
Created November 22, 2011 17:00 — forked from kornelski/HTML language
TextMate HTML language tweaked to support unquoted attributes
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|doctype<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl|section|article|header|footer|nav|aside)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
@BenWard
BenWard / scrobblejam.js
Created November 27, 2011 01:25
Scrobble my Jam: A pre-configured, bookmarklet version of Scrobble my Jam ready for use. Scrobbles playback from http://thisismyjam.com to http://last.fm. Enjoy.
/* Scrobble my Jam
*
* Bookmarklet JavaScript for scrobbling http://thisismyjam.com to
* Last.FM. If it doesn't scrobble, it doesn't count.
*
* (c) 2011 Ben Ward (@benward, http://benward.me)
*
* BSD License
*
* Instructions: Select all of the JavaScript text below, and drag it to your bookmarks
@scottkellum
scottkellum / normalized.html
Created December 6, 2011 14:58
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@nzakas
nzakas / namespace.js
Created December 6, 2011 19:14
A single global with a namespace method
//BSD Licensed
var YourGlobal = {
namespace: function(ns){
var parts = ns.split("."),
object = this,
i, len;
for (i=0, len=parts.length; i < len; i++) {
if (!object[parts[i]]) {
@insin
insin / Google Closure.sublime-build (Linux)
Created December 22, 2011 01:06
Google Closure Compiler build for Sublime Text 2
{
"cmd": ["java", "-jar", "${packages}/Google Closure/compiler.jar", "--js", "$file", "--js_output_file", "/dev/null", "--compilation_level", "WHITESPACE_ONLY"],
"file_regex": "^(.*):([0-9]+):() ERROR - (.*)",
"selector": "source.js"
}
@mirisuzanne
mirisuzanne / keyframes-sass-output.css
Created January 13, 2012 17:37
A Keyframes Mixin (Sass only)
@-webkit-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
100% { background-color: #ccffff; } }
@-moz-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
100% { background-color: #ccffff; } }
@-ms-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
@leikind
leikind / tm2st2
Created January 16, 2012 09:12
Textmate-to-Sublime Text 2 switcher's first steps
highlight all current words ctrl+cmd+G
select all found occurrences alt-enter
full screen mode ctrl-shift-cmd-f
VIM's o cmd-return
check syntax shift-alt-v
start multiline editing from a selected area command+shift+l
highlight a current word one by one cmd-d
skip a current word one by one cmd k, cmd-d
vertical selection ALT - mouse
@kentbrew
kentbrew / go_sopa_yourself.js
Created January 18, 2012 00:10
Go SOPA Yourself
(function (w, d, a) {
var $ = w[a.k] = {
"a": a, "w": w, "d": d,
"s": {},
"v": {'el': []},
"f": ( function () {
return {
listen : function (el, ev, fn) {
if(typeof $.w.addEventListener !== 'undefined') {
el.addEventListener(ev, fn, false);
@czottmann
czottmann / de.municode.Mailplane3Scheduler.plist
Created January 21, 2012 17:48
Start Mailplane3 at 10:00/14:00/18:00 o'clock each day.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>Mailplane3.scheduled</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Mailplane3.app/Contents/MacOS/Mailplane3</string>
</array>