Skip to content

Instantly share code, notes, and snippets.

Frédéric Camblor fcamblor

Block or report user

Report or block fcamblor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fcamblor
fcamblor / identifyDevoxxScheduleOptims.js
Last active Feb 26, 2020
Helping script to adjust DevoxxFr schedule columns (rooms) width
View identifyDevoxxScheduleOptims.js
async function loadScript(url) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
document.head.appendChild(script);
return new Promise((resolve) => setTimeout(resolve, 1000));
}
Promise.all([
loadScript("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js")
@fcamblor
fcamblor / README.md
Last active Dec 20, 2019
Variables extractor
View README.md

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 Dec 12, 2019
Et l'heureux gagnant est...
View noel.md

.... CAI !

@fcamblor
fcamblor / cli-utils.sh
Last active Dec 6, 2019
mv / cp latest download in target dir
View cli-utils.sh
#!/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 Nov 12, 2019
Async profiler on docker-alpine
View Dockerfile
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 / UpdateMACJDK.md
Last active Aug 8, 2019
[MAC users] Updating Oracle JDK to OpenJDK
View UpdateMACJDK.md

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 Sep 14, 2019 — 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.
View git-flip-last.sh
#!/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 Jun 20, 2019
CFP Speaker infos
View bio.md

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 Oct 16, 2018
OLD JIRA to NEW JIRA Versions migrator
View 1_run-this-in-old-jira.js
// 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();
You can’t perform that action at this time.