This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg width="500" height="150"> | |
<text x="100" y="80" fill="none" stroke="black" stroke-width="1" font-size="50">Loading...</text> | |
</svg> | |
<style> | |
text { | |
font-family: sans-serif; | |
stroke-dasharray: 100%; | |
stroke-dashoffset: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas width=600></canvas> | |
<script> | |
var ctx = document.querySelector("canvas").getContext("2d"), | |
dashLen = 220, dashOffset = dashLen, speed = 5, | |
txt = "Loading...", x = 0, i = 0; | |
ctx.font = "50px Comic Sans MS, cursive, TSCu_Comic, sans-serif"; | |
ctx.lineWidth = 5; | |
ctx.lineJoin = "round"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var months = [ | |
'January', 'February', 'March', 'April', 'May', | |
'June', 'July', 'August', 'September', | |
'October', 'November', 'December' | |
]; | |
function monthNumToName(monthnum) { | |
return months[monthnum - 1] || ''; | |
} | |
function monthNameToNum(monthname) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(element).is(":visible"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wordFreq(sWords) { | |
// make sure input looks right | |
if (!sWords) return false; | |
if (typeof sWords != 'string') return false; | |
// converts to lowercase. trims leading and trailing spaces | |
// removes all commas, semicolins, and periods | |
// converts string to array of words, split by space | |
sWords = sWords.toLowerCase().trim(); | |
sWords = sWords.replace(/[,;.]/g, ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vignette { | |
-webkit-box-shadow: inset 0px 0px 85px rgba(0,0,0,0.4); | |
-moz-box-shadow: inset 0px 0px 85px rgba(0,0,0,0.4); | |
box-shadow: inset 0px 0px 85px rgba(0,0,0,0.4); | |
line-height: 0; /* ensure no space between bottom */ | |
display: inline-block; /* don't go wider than image */ | |
} | |
.vignette img { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
/** | |
* @function | |
* @property {object} jQuery plugin which runs handler function once specified element is inserted into the DOM | |
* @param {function} handler A function to execute at the time when the element is inserted | |
* @param {bool} shouldRunHandlerOnce Optional: if true, handler is unbound after its first invocation | |
* @example $(selector).waitUntilExists(function); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wordFreq(sWords) { | |
// make sure input looks right | |
if (!sWords) return false; | |
if (typeof sWords != 'string') return false; | |
// converts to lowercase. trims leading and trailing spaces | |
// removes all commas, semicolins, and periods | |
// converts string to array of words, split by space | |
sWords = sWords.toLowerCase().trim(); | |
sWords = sWords.replace(/[,;.]/g, ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// author: https://javascriptweblog.wordpress.com/2011/07/11/waldo-search-the-javascript-runtime-in-under-1-kb/ | |
(function(){ | |
var traverse = function(util, searchTerm, options) { | |
var options = options || {}; | |
var obj = options.obj || window; | |
var path = options.path || ((obj==window) ? "window" : ""); | |
var props = Object.keys(obj); | |
props.forEach(function(prop) { | |
if ((tests[util] || util)(searchTerm, obj, prop)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
base=$1 | |
convert "$base" -resize '29x29' -unsharp 1x4 "Icon-Small.png" | |
convert "$base" -resize '40x40' -unsharp 1x4 "Icon-Small-40.png" | |
convert "$base" -resize '50x50' -unsharp 1x4 "Icon-Small-50.png" | |
convert "$base" -resize '57x57' -unsharp 1x4 "Icon.png" | |
convert "$base" -resize '58x58' -unsharp 1x4 "[email protected]" | |
convert "$base" -resize '60x60' -unsharp 1x4 "Icon-60.png" | |
convert "$base" -resize '72x72' -unsharp 1x4 "Icon-72.png" | |
convert "$base" -resize '76x76' -unsharp 1x4 "Icon-76.png" |
OlderNewer