Skip to content

Instantly share code, notes, and snippets.

View CoolOppo's full-sized avatar
🇺🇲

Max Azoury CoolOppo

🇺🇲
View GitHub Profile
@non
non / answer.md
Last active February 28, 2025 11:46
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@CoolOppo
CoolOppo / update-ffmpeg.sh
Created May 21, 2015 20:30
Automatically delete the contents of /c/ffmpeg, fetch the latest shared 64-bit build of ffmpeg from Zeranoe, extract it, put it in a tar file whilst deleting the directory contents after the pieces are put into the TAR, then extract the TAR, using --strip-components=2 in order to extract the files directly into /c/ffmpeg rather than /c/ffmpeg/ro…
#!/usr/bin/env bash
cd /c/ffmpeg
rm -rf ./*
aria2c --file-allocation=falloc http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.7z
7z x ffmpeg-latest-win64-shared.7z
rm ffmpeg-latest-win64-shared.7z
tar -c --remove-files -f ffmpeg.tar ./*
tar -x --strip-components=2 -f ffmpeg.tar
rm ffmpeg.tar
var a = [];
for (i = 33; 126 >= i; i++) a.push(String.fromCharCode(i));
var array = new Uint32Array(12);
window.crypto.getRandomValues(array);
var password = '';
for (var i = 0; i < array.length; i++) {
password += a[Math.round(array[i] / 4294967296 * a.length-1)];
}
console.log(password);
@lunelson
lunelson / gsap-properties-cheat-sheet.md
Last active March 14, 2025 12:07
Greensock Properties Cheat Sheet

Greensock CSS properties Cheat Sheet

I wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.

Standard CSS properties

...are all supported, with hyphenated-names becoming camelCaseNames. Non-animatable properties are also supported but they will be set at the beginning of the tween.

Special mentions:

@paulirish
paulirish / what-forces-layout.md
Last active October 23, 2025 10:35
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@mattatz
mattatz / LabColorspace.cginc
Created November 25, 2015 05:35
Conversion between RGB and LAB colorspace shader for Unity.
#ifndef __LAB_COLORSPACE__
#define __LAB_COLORSPACE__
/*
* Conversion between RGB and LAB colorspace.
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138
*/
float3 rgb2xyz( float3 c ) {
float3 tmp;
@cstewart90
cstewart90 / OpenWithSublimeText3.bat
Last active March 27, 2024 07:17 — forked from interisti/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@CoolOppo
CoolOppo / GALE01.ini
Last active June 2, 2016 17:32
Increase input timing accuracy in SSBM. Extracted from https://github.com/dolphin-emu/dolphin/pull/3876.
# GALE01 - Super Smash Bros. Melee
[Gecko]
$Increase input timing accuracy [Dan Salvato]
C21A4DA0 00000003
901C0000 3D808001
618C95FC 7D8903A6
4E800421 00000000
08402cc4 004e0400
@nimaid
nimaid / fraksl.pde
Last active July 17, 2025 06:37
Fraksl Processing Script
/*
A port of the Fraksl Android App by Ella Jameson
WASD to move, QE to rotate, [UP][DOWN] to zoom, P to take a picture in the sketch directory
*/
void mirror_screen()
{
loadPixels();
for(int row = 0; row < height; row++)
{
@jchandra74
jchandra74 / PowerShell Customization.md
Last active August 20, 2025 11:13
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.