Skip to content

Instantly share code, notes, and snippets.

@tallykatt
tallykatt / 0_reuse_code.js
Created December 22, 2016 19:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tallykatt
tallykatt / bookmarklet.js
Created December 17, 2016 04:56 — forked from elidupuis/bookmarklet.js
How to create a bookmarklet with an external js file.
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag.
// borrowed from http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', 'http://example.com/path/to/file.js');document.body.appendChild(jsCode);}());
@tallykatt
tallykatt / jqueryinfirebug.js
Created July 25, 2016 02:32 — forked from hugueslamy/jqueryinfirebug.js
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);
@tallykatt
tallykatt / index.html
Created July 25, 2016 02:23 — forked from chrisalbright/index.html
Bookmarklets :)
<a href='javascript:(function(){var a=alert,b=Date,c=Number,d="";if("undefined"!=typeof window.getSelection){var e=window.getSelection();if(e.rangeCount){for(var f=document.createElement("div"),g=0,h=e.rangeCount;g<h;++g)f.appendChild(e.getRangeAt(g).cloneContents());d=f.innerHTML}}else"undefined"!=typeof document.selection&&"Text"==document.selection.type&&(d=document.selection.createRange().htmlText);a(new b(c(d)));})();'>Parse Epoch</a>
@tallykatt
tallykatt / core.scss
Created July 25, 2016 02:23 — forked from mateusortiz/core.scss
core.scss
/* ---------------------------------------- *\
VARIABLES
\* ---------------------------------------- */
$red: #a32c28;
$white: #fff;
$lightest-grey: #eee;
@tallykatt
tallykatt / live.js
Created July 25, 2016 02:21 — forked from ewistrand/live.js
Livereload script
/*
Live.js - One script closer to Designing in the Browser
Written for Handcraft.com by Martin Kool (@mrtnkl).
Version 4.
Recent change: Made stylesheet and mimetype checks case insensitive.
http://livejs.com
http://livejs.com/license (MIT)
@livejs
@tallykatt
tallykatt / debug.js
Created July 25, 2016 02:20 — forked from notmasteryet/debug.js
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;
@tallykatt
tallykatt / inject_scripts.js
Created July 25, 2016 02:16 — forked from wassname/inject_scripts.js
Snippet to inject jquery etc into page
/**
Put links to injectable scripts in the cdns array. Try searching on cdnjs.com
but if you need the latest you can use the github version via https://rawgit.com/.
This start with // so they word on https and http.
They are not minified so comment are visible during development.
**/
var cdns = [
/* polyfill */
@tallykatt
tallykatt / social-sharer.html
Created July 25, 2016 02:16 — forked from Fischaela/social-sharer.html
List of Social Sharing Links
<a href="http://www.facebook.com/sharer.php?u=[post-url]"></a>
<a href="https://twitter.com/share?url=[post-url]&text=[post-title]&via=[via]&hashtags=[hashtags]"></a>
<a href="https://plus.google.com/share?url=[post-url]"></a>
<a href="https://pinterest.com/pin/create/bookmarklet/?media=[post-img]&url=[post-url]&is_video=[is_video]&description=[post-title]"></a>
<a href="http://www.linkedin.com/shareArticle?url=[post-url]&title=[post-title]"></a>
<a href="http://bufferapp.com/add?text=[post-title]&url=[post-url]"></a>
<a href="http://digg.com/submit?url=[post-url]&title=[post-title]"></a>
<a href="http://www.tumblr.com/share/link?url=[post-url]&name=[post-title]&description=[post-desc]"></a>
<a href="http://reddit.com/submit?url=[post-url]&title=[post-title]"></a>
<a href="http://www.stumbleupon.com/submit?url=[post-url]&title=[post-title]"></a>