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 / sunnytech.json
Last active May 13, 2024 22:13
voxxrin openplanner test
{
"openPlannerGeneratedJson": "https://gist.githubusercontent.com/fcamblor/2b4cb4f3ee1f2861cfe2ebb434dc6c20/raw/z_openplanner-sunnytech-generated-schedule.json",
"description": "",
"keywords": [],
"location": {
"country": "France",
"city": "Montpellier",
"coords": {
"latitude": 43.71636281966474,
"longitude": 3.847967787856771
{
"id": "devoxxpl23",
"cfpId": "devoxxpl23",
"cfpBaseUrl": "https://devoxxpl23.cfp.dev",
"eventFamily": "devoxx",
"headingTitle": "DevoxxPL 23",
"keywords": [
"Devoxx",
"Java",
"Kotlin",
@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 / configuration.yaml
Created July 24, 2023 09:43
HA Enphase v7 sensors adjustments
template:
# from https://community.home-assistant.io/t/enphase-envoy-with-energy-dashboard/328668
# Envoy's current_power_consumption / current_power_production are not "subtracting" solar production from it
# So we need to deal with it ourselves
- sensor:
- name: Grid Import Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
@fcamblor
fcamblor / 0-AcquisitionSchema.png
Last active July 7, 2023 15:19
Captation vidéo / Livestream Conf tech
0-AcquisitionSchema.png
@fcamblor
fcamblor / README.md
Last active January 11, 2023 06:46 — forked from rxx/README.md

agnoster-fcamblor.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@fcamblor
fcamblor / Code.gs
Created September 30, 2022 09:31
Analyse salaires région Bordelaise 2021 - Script
function computeSalariesPerXPResults(anneesXPCells, revenusCells, typesEntrepriseCells) {
if(anneesXPCells.length !== revenusCells.length || anneesXPCells.length !== typesEntrepriseCells.length) {
throw new Error("Different number of rows in inputs: "+JSON.stringify([anneesXPCells.length, revenusCells.length, typesEntrepriseCells.length]));
}
const distinctEntTypes = new Set();
const salariesPerXPResults = anneesXPCells.reduce((salariesPerXP, anneeXPRow, idx) => {
const anneeXP = Number(anneeXPRow[0]);
const salary = Number(revenusCells[idx][0]);
@fcamblor
fcamblor / README.md
Last active August 17, 2022 07:59
debug-requirejs-loading.js

Simply include debug-requirejs-loading.js script before starting your requirejs dependencies :

<script src="scripts/require.js"></script>
<script src="path/to/debug-requirejs-loading.js"></script>
<script type="text/javascript">
require(['data/main'], function(){ console.log("requirejs started !"); });
</script>

It will show :

@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 / identifyDevoxxScheduleOptims.js
Last active April 15, 2022 12:17
Helping script to adjust DevoxxFr schedule columns (rooms) width
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")