Skip to content

Instantly share code, notes, and snippets.

View gre's full-sized avatar
3 cups required

@greweb gre

3 cups required
View GitHub Profile
@gre
gre / timelapse
Last active August 17, 2017 10:55
[MacOSX] Minimal script for timelapse capturing your screen
#!/bin/bash
# Minimal script for timelapse capturing your screen in MacOSX.
# You must run the script, from an empty directory where the images will be stored.
# Usage: ./timelapse
# or
# Usage: ./timelapse <seconds>
@gre
gre / README.md
Last active November 10, 2015 18:14
Panzer Dragoon 1k

"Panzer Dragoon 1k" is a 2D remake of Panzer Dragoon in 1k of JavaScript for JS1K 2014 by @greweb

Goal

Use your Dragoon to prevent enemies from escaping.

How to play

@gre
gre / README.md
Last active November 12, 2021 15:20
Boilerplate of a JS1K submission + JSCrush & uglify tools

JS1K Boilerplate

Build tools

Install tools

npm install
@gre
gre / lazy.js
Created February 17, 2014 11:24
Real use-case for the advanced "fun.length" feature of JavaScript
function bindSomething (cb) {
anyEventSystem.on("something", function (e) {
if (cb.length === 0) {
cb();
}
else {
var computation = takesALotOfCPU();
cb(computation);
}
});
@gre
gre / dog.js
Last active August 29, 2015 13:56
simple object model binding
function Dog (name, age) {
this._f = {};
this._prop("name", name);
this._prop("age", age);
}
Dog.prototype = {
_prop: function (prop, initialValue) {
var self = this;
Object.defineProperty(this, prop, {
@gre
gre / circleopen.glsl
Last active January 4, 2016 10:29 — forked from gre/TEMPLATE.glsl
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@gre
gre / fadetocolor.glsl
Last active January 4, 2016 10:29 — forked from gre/TEMPLATE.glsl
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@gre
gre / heartwipe.glsl
Last active January 4, 2016 10:29 — forked from gre/TEMPLATE.glsl
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@gre
gre / dispersionblur.glsl
Last active January 4, 2016 10:29 — forked from gre/TEMPLATE.glsl
#ifdef GL_ES
precision highp float;
#endif
#define QUALITY 32
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
@gre
gre / uniforms.default.json
Last active January 4, 2016 10:29 — forked from gre/TEMPLATE.glsl
{ "size": 0.3 }