Skip to content

Instantly share code, notes, and snippets.

@julien
julien / config.toml
Created October 12, 2023 16:46
helix config (~/.config/helix/config.toml)
[editor]
gutters = ["line-numbers", "spacer"]
auto-format = false
auto-pairs = false
[editor.cursor-shape]
insert = "bar"
[editor.file-picker]
git-ignore = true
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform float u_time;
float draw_circle(vec2 position, float radius) {
return step(radius, length(position - vec2(.5)));
}
@julien
julien / metaballs.glsl
Created October 29, 2016 12:24
simple metaball shader
precision highp float;
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
float ball(vec2 p, float fx, float fy, float ax, float ay) {
vec2 r = vec2(p.x + sin(time * fx) * ax, p.y + cos(time * fy) * ay);
return 0.09 / length(r);
}
@julien
julien / backbone.mock.js
Created January 12, 2012 14:17
BackboneMock
(function() {
var root = this;
var BackboneMock = (function() {
if(typeof Backbone === 'undefined') {
throw '"Backbone" is undefined, make sure you have loaded ' +
'backbone.js before using this mock utility';
}
// Override Backbone.sync
// because we want to mock the requests