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
/* | |
,,, | |
(o o) | |
-._,--------------._,----ooO--(_)--Ooo--._,---- | |
Kilroy was here! | |
*/ | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<pre> | |
U+2302 ⌂ HOUSE | |
U+2303 ⌃ UP ARROWHEAD |
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
<style type="text/LESS"> | |
.browser { | |
&-msg { | |
position: absolute; | |
background-color: #333; | |
color: #fff; | |
z-index: 999999; | |
width: 550px; | |
margin: 15% auto; | |
display: block; |
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
// colours | |
@paleblue: #a0d3f1; | |
@half: 47%; | |
// Functions | |
.fontmuseo (@size: 14px, @color: #FFFFFF, @weight: 500, @style: normal) { | |
font-family: 'MuseoSans', Arial, sanserif; | |
font-size: @size; | |
color: @color; | |
font-weight: @weight; | |
font-style: @style; |
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
/* | |
String.wordwrap(@length INT [ @spill INT ]) | |
A String prototype to wrap long strings into lines with an ideal length | |
by recurrsively itterating over the string, to complie an array of lines. | |
Arguments: | |
@length: INT (required) - ideal string length of characters per line | |
@spill: INT (optional) - margin of tolerance, a greedy look ahead |
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
/* | |
This is a proxy function to minimize console.log | |
output on production server. It creates non-existant | |
window.console Object for old browsers, and defers all | |
log events via the proxy function. | |
Usage: | |
(on your dev server) | |
window.message('kilroy was here...'); // normal output. | |
(on your production server) |
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 lorem = (function () { | |
/* (c) 2013 - Qwack Ltd. -------------------------- */ | |
var i = 0, | |
l = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodoconsequat. Duis aute irure dolor in reprehenderit in voluptate velit essecillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat nonproident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.split(' '), | |
n = l.length, | |
r = function (n) { return Math.floor((Math.random()*n)+1); }, | |
u = r(100), | |
t = '', | |
a = '', | |
w = function (q) { |
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
/* Additional Primative Object Extensions */ | |
String.prototype.capitals = function () { | |
// 'kilRoY waS hErE!' >> 'Kilroy Was Here!' | |
return (this || '').replace(/([^ ])([^ ]*)/g, | |
function(a,b,c) { return b.toUpperCase() + c.toLowerCase(); }); | |
}; | |
String.prototype.snake = function () { | |
// 'kilRoY waS hErE!' >> 'kilRoY_waS_hErE!' | |
return (this || '').replace(/\s+/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
/* | |
@fliptopbox | |
LZW Compression/Decompression for Strings | |
Implementation of LZW algorithms from: | |
http://rosettacode.org/wiki/LZW_compression#JavaScript | |
Usage: | |
var a = 'a very very long string to be squashed'; | |
var b = a.compress(); // 'a veryāăąlong striċ to bečquashed' |
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
/*jslint bitwise: true, eqeq: true, sloppy:true, white:true, passfail: false, nomen: false, plusplus: false, undef: true, evil: true */ | |
/*global window, setTimeout, document, console, $, jQuery, self */ | |
/* | |
An object to return the domain name, taking into account | |
the various top-level-domains (TLD) and second-level-domains (SLD) | |
as maintained by mozilla (see: https://wiki.mozilla.org/TLD_List) | |
this list was last modified on 11 January 2010, at 09:32 | |
USAGE: |