Skip to content

Instantly share code, notes, and snippets.

@julien
julien / nomusic.scpt
Created April 11, 2025 22:38
Prevent Music.app from launching automatically on macOS
-- usage: osascript nomusic.scpt
-- prevent Music.app from launching (semi-randomly).
-- stupid solution to fix this stupid behaviour:
-- loop forever and if we detect that Music.app
-- is running we "quit" it, the ideal solution would
-- be to able to remove all those defaults .apps ...
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
#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