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 / balls.html
Created February 18, 2013 10:03
Made for a tutorial video: http://blog.greweb.fr/?p=2163
<!DOCTYPE html>
<canvas id="game" width="600" height="400"></canvas>
<script id="fragment" type="x-shader/x-fragment">
precision mediump float;
uniform vec2 resolution;
uniform float time;
struct Ball {
Class Rectangle
val rectWrites = (
(__ \ 'width).write[Long] and
(__ \ 'height).write[Long] and
(__ \ 'x).write[Long] and
(__ \ 'y).write[Long]
)( (r: Rectangle) => (r.width, r.height, r.x, r.y) )
@zeh
zeh / DoomScreenTransition.glsl
Created May 23, 2014 18:00 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
// Hardcoded parameters --------
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
@corporateshark
corporateshark / PageCurl.glsl
Created May 20, 2014 12:37 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
// Adapted by Sergey Kosarevsky from:
// http://rectalogic.github.io/webvfx/examples_2transition-shader-pagecurl_8html-example.html
@diogomoretti
diogomoretti / fonts.styl
Last active November 20, 2019 06:37
Stylus mixin @font-face
// Fonts mixin
font-url(file)
return '../fonts/' + file
webfont(family, file, hack-chrome-windows = false, weight = 'normal')
@font-face
font-family family
src url(font-url(file + '.eot'))
src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'),
url(font-url(file + '.woff')) format('woff'),
@gre
gre / cube.glsl
Created June 12, 2014 17:13 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform float persp;
uniform float unzoom;
uniform float reflection;
@rectalogic
rectalogic / CrossZoom.glsl
Last active March 25, 2022 05:10 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
// Converted from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/CrossZoom/CrossZoom.frag
// Which is based on https://github.com/evanw/glfx.js/blob/master/src/filters/blur/zoomblur.js
// With additional easing functions from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/Easing/Easing.glsllib
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@parshap
parshap / node-modules-in-react-native.md
Last active November 15, 2023 11:15
Running Node Modules in React Native

Running Node Modules in React Native

How to use packages that depend on Node.js core modules in React Native.

See the [node-libs-react-native][node-libs-react-native] library as a convenience for implementing this method.

Node.js Core Modules