Skip to content

Instantly share code, notes, and snippets.

View Aldlevine's full-sized avatar

Aaron Levine Aldlevine

  • 127.0.0.1
View GitHub Profile
@Aldlevine
Aldlevine / Typescript Observable
Last active September 5, 2023 02:35
Typescript Observable
...
@Aldlevine
Aldlevine / Python MultiDispatch
Last active September 5, 2023 02:36
Python MultiDispatch
...
@Aldlevine
Aldlevine / animated_atlas_texture.gd
Last active April 6, 2022 00:02
Adds an animated atlas texture to Godot
extends AtlasTexture
class_name AnimatedAtlasTexture
export(int, 1, 100) var h_frames := 1
export(int, 1, 100) var v_frames := 1
export var fps := 10.0
var previous_frame := 0
var frame := 0
@Aldlevine
Aldlevine / git-log.sh
Last active September 30, 2018 01:53
git log
# command
git log --graph --pretty=format:"%Cred%h%Creset %C(yellow)%d%Creset %C(bold blue)<%an> %Cgreen(%cr)%n%n %Creset%s%n" --abbrev-commit
# alias
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %C(bold blue)<%an> %Cgreen(%cr)%n%n %Creset%s%n' --abbrev-commit"
@Aldlevine
Aldlevine / .htaccess
Created November 17, 2016 14:33
cgi.js forwards a CGI request to a server. It works with both http.Server and Express (if using http.Server as well). Performance is lacking as there is a lot of overhead from CGI.
Options +ExecCGI
AddHandler cgi-script cgi
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) server.cgi
@Aldlevine
Aldlevine / performance.now-polyfill.js
Last active July 21, 2019 13:45
window.performance.now --- polyfill
(function(){
// performance.now already exists
if(window.performance && window.performance.now)
return;
// performance exists and has the necessary methods to hack out the current DOMHighResTimestamp
if(
window.performance &&
window.performance.timing &&