Navigation Menu

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 / burn.glsl
Created May 20, 2014 09:03 — forked from glslioadmin/TEMPLATE.glsl
/!\ **DEV ONLY** - GLSL.io Transition (v1) used for the development
// This template should ONLY be used for DEVELOPMENT
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform vec3 color;
@Xaychru
Xaychru / Mosaic.glsl
Created May 19, 2014 16:51 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
#define PI 3.14159265358979323
#define POW2(X) X*X
#define POW3(X) X*X*X
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform int endx;
@gre
gre / swap.glsl
Created May 16, 2014 13:59 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@gre
gre / doorway.glsl
Created May 16, 2014 13:54 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@maxfenton
maxfenton / a-new-mac-setup.md
Last active April 17, 2024 10:55
System setup stuff for a new OLD mac (a/o 2020)

New computer setup

a/o 2020-05-29

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS
@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'),
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) )
@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
@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 {
(use '[clojure.core.logic])
(require '[clojure.core.logic.fd :as fd])
(defn simple []
(run* [x y]
(fd/in x y (fd/interval 0 9))
(fd/eq
(= (+ x y) 9)
(= (+ (* 4 x) (* 2 y)) 24))))