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

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;
/*
Copyright 2021 Antoine Morin-Paulhus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@antoineMoPa
antoineMoPa / .emacs
Created January 9, 2021 21:25
Part of my .emacs
(setq make-backup-files nil)
(menu-bar-mode 0)
(tool-bar-mode 0)
(delete-selection-mode)
(defun beforesave ()
"deletes trailing spaces"
(delete-trailing-whitespace)
)
(add-hook 'before-save-hook #'beforesave)
(setq ring-bell-function 'ignore)