Skip to content

Instantly share code, notes, and snippets.

Simon Fremaux dievardump

Block or report user

Report or block dievardump

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dievardump
dievardump / fetcher.js
Last active Jul 4, 2018
Fetch wrapper
View fetcher.js
/**
Usage
fetch
.get(url, options)
.then(json)
.catch(err)
fetch
.post(url, options)
View genesis_public_key
04ee539b4c9f3a52bde8849b6120811507402306cbd3f120bcab20fbfdba6e5ffa7704d6e808a23e0740ce7676e2dbc661473767610a27be3259f1b7362b1d01bf;romanornr
@dievardump
dievardump / promise.js
Last active Aug 29, 2015
Really simple implementation of Promise - Not fully tested (catch was not)
View promise.js
var Promise = function(resolver) {
if (typeof resolver !== 'function') {
throw new Error('Promise constructor parameter must be a function.');
}
this._callbacks = [];
this._catchers = [];
this.running = true;
View gist:7ff1bf123df2391281e1
UNKNOWN = "*"
BOMB = "B"
GRID_SIZE = 5
def init1():
return [[UNKNOWN] * GRID_SIZE] * GRID_SIZE
def init2():
grid = []
for i in range(GRID_SIZE):
View scss-variables.md

Hi guys !

So I read your concept, and completely agree with the first point: $background-color: #fff; is not possible for long term. However, I see in your approach some flaws concerning DRY and reusable elements/modules like the ones we can see in OOCSS and similar libraries.

So I will point out what I think can be flaws, and my solutions, and would love your feedback on that: Context:

My page contains several blocks which all have the same background-color.
My page will evolved with time.

View gist:6042052
if (navigator.geolocation) {
function allowed(position) {
initialise(true, position);
}
function refused() {
initialise(false);
}
View gist:3981866
/*
█░░░░░█░░░░░░░░░░░░░░░░░░░░░█░░█░░░░░░░░░░░░░░█▀▀█
█░█▀█░█░░█░█░░█▀█▀█░█▀▀█░█▀▀█░░█▀▀█░█▀▀░█▀▀▀█░░░░█
█░█░█░█░░█░█░░█░█░█░█▀▀█░█░░█░░█░░█░█░░░█░░░█░░▀▀▀
▀░▀▀▀░▀░░▀▀▀░░▀░░░▀░▀░░▀░▀▀▀▀░░▀▀▀▀░▀░░░▀▀▀▀▀░░█░░
*/
@dievardump
dievardump / simily-zenco-js
Created Aug 16, 2012
simily Zencoding Template Engine
View simily-zenco-js
var template = '(div[id=menu, class={menu.menuclass}]>ul>li[class={menu.itemclass}, html={title}, map={menu.items}])+(div[class=body]>div[class=content]>p[html={maincontent}])',
data = {
maincontent: 'foo bar',
menu: {
menuclass: 'menu',
itemclass: 'menu-item',
items: [
{ title: 'first entry' },
{ title: 'second entry' },
{ title: 'third entry' },
View avatar yahouuuu
$('body').append('<style>@-moz-keyframes myEffingAnimation { 25% { -moz-transform: rotate(-360deg) scale(4); } 50% { -moz-transform: rotate(0) scale(1); } 75% { -moz-transform: rotate(360deg) scale(4); } 100% { -moz-transform: rotate(0) scale(1); }}@-webkit-keyframes myEffingAnimation { 25% { -webkit-transform: rotate(-360deg) scale(4); } 50% { -webkit-transform: rotate(0) scale(1); } 75% { -webkit-transform: rotate(360deg) scale(4); } 100% { -webkit-transform: rotate(0) scale(1); }}@-ms-keyframes myEffingAnimation { 25% { -ms-transform: rotate(-360deg) scale(4); } 50% { -ms-transform: rotate(0) scale(1); } 75% { -ms-transform: rotate(360deg) scale(4); } 100% { -ms-transform: rotate(0) scale(1); }}@-o-keyframes myEffingAnimation { 25% { -o-transform: rotate(-360deg) scale(4); } 50% { -o-transform: rotate(0) scale(1); } 75% { -o-transform: rotate(360deg) scale(4); } 100% { -o-transform: rotate(0) scale(1); }}@keyframes myEffingAnimation { 25% { transform: rotate(-360deg) scale(4); } 50% { transform:
You can’t perform that action at this time.