Skip to content

Instantly share code, notes, and snippets.

View kahlil's full-sized avatar

Kahlil Lechelt kahlil

View GitHub Profile
@cowboy
cowboy / silly-array-shuffle.js
Created December 1, 2011 17:22
JavaScript: Silly Array Shuffle
// Array.indexed(4) returns [0, 1, 2, 3]
Array.indexed = function(n) {
var result = [];
while (n--) {
result[n] = n;
}
return result;
};
// Shuffle an array in a not too efficient way.
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@chuanxshi
chuanxshi / mobile tags for your '<head>'
Created March 1, 2011 14:56
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->
@andreruffert
andreruffert / .htaccess
Created February 18, 2011 10:37
Minify CSS
RewriteEngine On
RewriteRule ^styles.min.css$ styles.min.php [L]
@kahlil
kahlil / gradient-triangles.css
Created September 16, 2010 10:09
Ingenius solution to create a CSS triangle with a gradient.
/* Code is by A.J. Cates (http://ajcates.com). Find his post here: http://forr.st/~XGU */
#gradient-triangle {
width: 60px;
height: 60px;
position: absolute;
top: 3em;
left: -30px;
clip: rect(auto 30px 60px auto);
}
// Console arguments testing
var apc = [].slice;
(function(){
console.log( apc.call(arguments) );
})( "false", 1, undefined, null, ["foo","bar","baz"], {a:1,b:2}, false );
(function(){
console.log.call( console, apc.call(arguments) );
@edavis10
edavis10 / _config.yml
Created November 6, 2009 02:18
Pagination in Jekyll
# ....other stuff here
paginate: 10