Skip to content

Instantly share code, notes, and snippets.

View shudal's full-sized avatar
🌴
Interrupting

shudal

🌴
Interrupting
View GitHub Profile
@yiwenl
yiwenl / bezier.glsl
Last active January 28, 2025 04:10
Bezier curve in GLSL
// bezier curve with 2 control points
// A is the starting point, B, C are the control points, D is the destination
// t from 0 ~ 1
vec3 bezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) {
vec3 E = mix(A, B, t);
vec3 F = mix(B, C, t);
vec3 G = mix(C, D, t);
vec3 H = mix(E, F, t);
vec3 I = mix(F, G, t);
@ayonliu
ayonliu / Install-php5.6-on-Centos7.md
Last active February 3, 2023 22:56
Install php5.6 on Centos 7
@ejoubaud
ejoubaud / simulate_keypress.js
Last active April 9, 2024 18:38
Simulate keypress that works in Google nav in Chrome
// Based on http://stackoverflow.com/a/10520017/1307721 and http://stackoverflow.com/a/16022728/1307721
Podium = {};
Podium.keydown = function(k) {
var oEvent = document.createEvent('KeyboardEvent');
// Chromium Hack
Object.defineProperty(oEvent, 'keyCode', {
get : function() {