Skip to content

Instantly share code, notes, and snippets.

View fcamblor's full-sized avatar

Frédéric Camblor fcamblor

View GitHub Profile
@fcamblor
fcamblor / README.md
Last active December 20, 2019 15:44
Variables extractor

Idea is to provide a working implementation for extractVariablesFrom(str) js function. Basically, this function is intended to extract variable names from a string, considering that variable name should be surrounded with double or triple braces (mixing not allowed) and name should not contain any space. Obviously, variable may appear anywhere in the string (at the start/end typically, or "glued" to another variable).

Background : I translate an application into many languages. A translation can either be a raw string or a handlebar template string. In latter case, I give to my translator the raw template string (with some handlebar variables embedded into it) and I expect them to NOT alter this template string (typically, don't remove braces nor translate variable names).

@fcamblor
fcamblor / noel.md
Last active December 12, 2019 14:01
Et l'heureux gagnant est...

.... CAI !

@fcamblor
fcamblor / cli-utils.sh
Last active December 6, 2019 13:47
mv / cp latest download in target dir
#!/bin/bash
function cpLatestDlTo(){ cp "$HOME/Downloads/$(ls -t ~/Downloads | head -n 1)" "$1" }
function mvLatestDlTo(){ mv "$HOME/Downloads/$(ls -t ~/Downloads | head -n 1)" "$1" }
@fcamblor
fcamblor / Dockerfile
Last active September 16, 2023 21:07
Async profiler on docker-alpine
FROM tomcat:7-jre8-alpine
# See https://github.com/jvm-profiling-tools/async-profiler/issues/207
RUN apk update && apk add --no-cache libc6-compat perl openjdk8-dbg
RUN mkdir /usr/local/async-profiler/ &&\
wget -O /usr/local/async-profiler/async-profiler.tar.gz https://github.com/jvm-profiling-tools/async-profiler/releases/download/v1.5/async-profiler-1.5-linux-x64.tar.gz &&\
cd /usr/local/async-profiler/ &&\
tar -xvzf async-profiler.tar.gz &&\
rm -f /usr/local/async-profiler/async-profiler.tar.gz
@fcamblor
fcamblor / 0-AcquisitionSchema.png
Last active July 7, 2023 15:19
Captation vidéo / Livestream Conf tech
0-AcquisitionSchema.png
@fcamblor
fcamblor / UpdateMACJDK.md
Last active November 9, 2020 13:49
[MAC users] Updating Oracle JDK to OpenJDK

Starting from February 2019, Oracle JDK updates will require Commercial license if you make any business using Java (eg, you're a Java Developper not spending only your spare time developping with Java).

It includes Java not only on your server, but on your laptop as well.

Source | Source

What's nasty is Java versions will remains free to download since if you use it as an individual/personal use, you won't be concerned by the commercial aspects of the license.

@fcamblor
fcamblor / git-flip-last.sh
Last active August 5, 2022 16:00 — forked from eddiemoya/git-flip-last.sh
Flip the last two commits in a branch using git-cherry-pick, git-update-ref and git-rev-parse. Interesting exercise using quite a bit of plumbing commands.
#!/bin/bash
flip_last_branch_name=ongoing-flip-last;
git rev-parse --verify $flip_last_branch_name > /dev/null 2>&1;
res=$?;
if [ "$res" = "0" ]; then
echo "An ongoing flip-last is already in progress ($res) ... execute following command to remove it : git branch -D $flip_last_branch_name";
exit -1;
fi;
@fcamblor
fcamblor / bio.md
Last active June 20, 2019 14:29
CFP Speaker infos

Créateur de la conférence BDX I/O et ancien Bordeaux JUG leader, Frédéric aime cotoyer les différentes communautés tech et apprendre de nouvelles choses.
Le jour, il est Tech Lead sur les technos web/mobile chez 4SH. La nuit, il se transforme en commiter OSS (RestX et plein d'autres petits projets).
Il est extrêmement enthousiaste d'enfin voir arriver du typage statique sur le front avec Typescript.
⚠️Attention ⚠️: il trouve très souvent une solution à un problème avec une Google Spreadsheet.

@fcamblor
fcamblor / 1_run-this-in-old-jira.js
Last active October 16, 2018 13:02
OLD JIRA to NEW JIRA Versions migrator
// Navigate on "Project Version Administration" screen in OLD JIRA
// (https://jira.4sh.fr/plugins/servlet/project-config/<PROJECT KEY>/versions)
// and execute cote below in GOOGLE CHROME console
function copyEveryOldVersionInClipboard(){
var versions = jQuery("#project-config-versions-table tbody tr").map((idx, trEl) => {
var $tr = jQuery(trEl);
var releaseDate = $tr.find("[data-field-name='userReleaseDate']").text();
if(releaseDate === 'Add release date'){ releaseDate = ''; }
var description = $tr.find("[data-field-name='description']").text();
@fcamblor
fcamblor / dev-mode-hotcompile.log
Last active May 9, 2018 11:38
restx & java10 errors
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/java -Dvisualvm.id=147543278494828 "-javaagent:/Users/fcamblor/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/181.4892.27/IntelliJ IDEA 2018.1 EAP.app/Contents/lib/idea_rt.jar=50774:/Users/fcamblor/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/181.4892.27/IntelliJ IDEA 2018.1 EAP.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Users/fcamblor/Documents/projects/restx/restx-samplest/target/classes:/Users/fcamblor/.m2/repository/io/restx/restx-core/0.36-SNAPSHOT/restx-core-0.36-SNAPSHOT.jar:/Users/fcamblor/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.10/jackson-core-2.8.10.jar:/Users/fcamblor/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.10/jackson-annotations-2.8.10.jar:/Users/fcamblor/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.10/jackson-databind-2.8.10.jar:/Users/fcamblor/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.8.10/jackson-