Skip to content

Instantly share code, notes, and snippets.

View Victa's full-sized avatar
🏠
Working from home

Victor Coulon Victa

🏠
Working from home
View GitHub Profile
@lokamaya
lokamaya / dateformat.js
Created December 11, 2008 14:00
Multilingual DateFormat: Prototype Version
/**================================================
* DateFormat version 1.1 (Prototype Version)
* Created: 08 September 2008
* Modified: 01 December 2008
* Created by: Zaenal - http://www.lokamaya.net
* ================================================
* Copyright (c) 2008 Zaenal - http://www.lokamaya.net
* Some rights reserved. This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.
*
* ================================================
@louisremi
louisremi / matchyepnope.js
Created May 5, 2011 14:22
conditional resource loading with matchMedia and yepnope
yepnope({
test : window.matchMedia("(orientation: portrait)").matches,
yep : "portrait.js",
nope : "landscape.js"
});
@hiroprotagonist
hiroprotagonist / gist:993325
Created May 26, 2011 15:02
An Instant Search like widget
(function($, window, undefined) {
$.widget("mobile.instantsearch", $.mobile.widget, {
si: undefined, //search inupt
rd: undefined, //result div
timeout: undefined,
options: {
delay: 500
},
_init: function() {
this.rd= $("<div>");
@rwaldron
rwaldron / popcorn.html
Created June 2, 2011 21:52
A smallish Popcorn.js example. Check it live: http://jsfiddle.net/rwaldron/m94Tn/
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script>
// ensure the DOM has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcporn instance by calling Popcorn("#id-of-my-video")
@atk
atk / LICENSE.txt
Created June 19, 2011 15:45 — forked from 140bytes/LICENSE.txt
polyfill an ES5-compatible Array.prototype.indexOf
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
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
@maccman
maccman / hr.less
Created July 11, 2011 18:47
HR CSS3 Tapering
/* See http://cl.ly/8KmQ for an example */
hr {
margin: 15px 0;
position: relative;
border: 1px solid transparent;
.box-shadow(0, 1px, 2px, rgba(0,0,0,0.3));
&:before, &:after {
content: "";
@addyosmani
addyosmani / vendorPrefix.js
Created August 8, 2011 06:13 — forked from danheberden/vendorPrefix.js
Get the vendor prefix for a property in a specific context.
function getPrefix(prop, context) {
var vendorPrefixes = ['moz', 'webkit', 'khtml', 'o', 'ms'],
upper = prop.charAt(0).toUpperCase() + prop.slice(1),
pref, len = vendorPrefixes.length,
q;
while (len--) {
q = vendorPrefixes[len];
if (context.toString().indexOf('style')) {
q = q.charAt(0).toUpperCase() + q.slice(1);
@addyosmani
addyosmani / matchMedia.js
Created August 17, 2011 11:33 — forked from paulirish/matchMedia.js
media query check - matchMedia - moved to https://github.com/paulirish/matchMedia.js
/*
* matchMedia() polyfill - test whether a CSS media type or media query applies
* authors: Scott Jehl, Paul Irish, Nicholas Zakas
* Copyright (c) 2010 Filament Group, Inc
* MIT license
* dev.w3.org/csswg/cssom-view/#dom-window-matchmedia
* in Chrome since m10: http://trac.webkit.org/changeset/72552
*/
@ryanflorence
ryanflorence / logtime.js
Created January 4, 2012 16:26
Log the time of JS operations
var logtime = (function() {
var ids = {};
return function(id) {
if (!ids[id]) {
ids[id] = +new Date();
return;
}
var time = +new Date() - ids[id];
@yatil
yatil / dabblet.css
Created January 30, 2012 11:11
Triangle with Shadow
/*
Triangle with Shadow
*/
body {
padding: 100px;
}
.triangle-with-shadow {
width: 100px;