Skip to content

Instantly share code, notes, and snippets.

View antoineMoPa's full-sized avatar

Antoine M-P antoineMoPa

  • Sherbrooke, Québec, Canada
View GitHub Profile
@antoineMoPa
antoineMoPa / gist:3ec1742488de72dedc9940b68d4927e8
Created April 4, 2023 20:31
Beamcoder filter info (output of `beamcoder.filters()`)
{
abench: {
name: 'abench',
description: 'Benchmark part of a filtergraph.',
inputs: [ [Object] ],
outputs: [ [Object] ],
priv_class: { type: 'Class', class_name: 'abench', options: [Object] },
flags: {
DYNAMIC_INPUTS: false,
DYNAMIC_OUTPUTS: false,
@antoineMoPa
antoineMoPa / Makefile
Last active October 22, 2022 16:07 — forked from miguelmota/Makefile
Go (golang) WebAssembly (WASM) hello world example
serve: compile
go run server.go
compile: main.go
GOARCH=wasm GOOS=js go build -o test.wasm main.go

RTL Languages and Samples

Here are some RTL languages with sample text. Credit goes to Wikipedia contributors for sample texts!

Arabic

 وفي كتابة لغات أخرى في آسيا وأفريقيا كذلك، مثل اللغات الأذرية والسندية والبشتوية والفارسية والبنجابية والكردية واللرية والأردية والمندنكوية وغيرها. وكان مسلمو الصين يستخدمونها

How swarmia determines the scope creep?

As far as I understand, swarmia calculates the epic scope creep as the number of additional child tickets divided by the number of original child tickets. Feel free to comment & correct me!

                    number of additional child tickets
scope creep =  --------------------------------------------
                 number of tickets originally in the epic

Starting emacs faster for git commit editing

This command line will make emacs start faster when used with git, avoiding your init file.

git config --global core.editor "emacs --no-init-file --no-splash" --replace-all
#version 300 es
#define PI 3.14159265359
#define PI2 6.28318530718
precision highp float;
uniform float time;
uniform float iGlobalTime;
in vec2 UV;
out vec4 out_color;
uniform vec3 iResolution;
str.split(/[ \t\n]/).map(w => w.length > 3 ? w.substr(0,w.length-2) + 'on' : w).join(' ')
@antoineMoPa
antoineMoPa / find-node-project-root.elisp
Created August 7, 2021 18:25
Find node project root (first parent folder with a package.json)
(defun get-node-project-dir ()
"Find first parent folder with package.json"
(setq project_dir ".")
(while (and
(not (eq nil project_dir))
(not (string= project_dir "/"))
(eq nil (member "package.json" (directory-files project_dir)))
)
(setq project_dir (expand-file-name (concat project_dir "/.."))))
@antoineMoPa
antoineMoPa / .bashrc
Created March 6, 2021 21:26
.bashrc part to create the "e" alias that opens a file in your current emacs (if none, starts emacs)
emacsclient_and_start_emacs_if_needed () {
if [ -z `pgrep emacs` ]
then
nohup emacs &
sleep 1
fi
emacsclient -n $1
}
alias e="emacsclient_and_start_emacs_if_needed"
#version 130
// Some dead code for future reference.
uniform samplerCube p3d_Texture0;
uniform float time;
uniform vec3 camera_position;
// Input from vertex shader
in vec2 texcoord;