Skip to content

Instantly share code, notes, and snippets.

View soundstep's full-sized avatar
💭
There is a difference between a peasant and a knight

Romuald Quantin soundstep

💭
There is a difference between a peasant and a knight
View GitHub Profile
@soundstep
soundstep / 0_reuse_code.js
Created November 27, 2013 17:11
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
@soundstep
soundstep / package.json
Created August 15, 2013 18:57
Auto install (preinstall) grunt-cli from package.json
{
"name": "Project name",
"version": "0.0.0",
"author": "Author name",
"scripts": {
"preinstall": "which -s grunt && grunt --version | grep grunt-cli > /dev/null 2>&1; if [[ \"$?\" != 0 ]]; then npm install grunt-cli -g; exit 0; fi"
},
"devDependencies": {
"grunt": "~0.4.1"
}
div {
background-color: #ccc;
margin: 20px;
width: 50px;
height: 50px;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: ease-out;
}
.square {
width: 100px;
height: 100px;
background: red;
margin: 5px;
}
.animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
.square {
width: 100px;
height: 100px;
background: red;
margin: 5px;
}
.animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
@soundstep
soundstep / javascript hash map
Created October 27, 2012 17:22
javascript hash map
var HashMap = function(){
var uuid = function(a,b){for(b=a='';a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):'-');return b;}
var getKey = function(target) {
if (!target) return;
if (typeof target !== 'object') return target;
return target.hashkey ? target.hashkey : target.hashkey = uuid();
}
return {
put: function(key, value) {
this[getKey(key)] = value;
@soundstep
soundstep / dabblet.css
Created May 11, 2012 11:53 — forked from anonymous/dabblet.css
css buttons
.button
{
display: inline-block;
white-space: nowrap;
background-color: #ccc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc));
background-image: -webkit-linear-gradient(top, #eee, #ccc);
background-image: -moz-linear-gradient(top, #eee, #ccc);
background-image: -ms-linear-gradient(top, #eee, #ccc);
background-image: -o-linear-gradient(top, #eee, #ccc);