Skip to content

Instantly share code, notes, and snippets.

250 dattes, hacher fin
60g poudre amande
20g graines chia
60g beurre de cacahuète
1 pincée de sel
3 càs d'eau
pour 8-10mm d'épaisseur et rectangles de 3x8cm, mettre au four à 80 degrés pendant 1h
@Lucassifoni
Lucassifoni / config.json
Last active October 23, 2025 07:26
Plant detection system
{
"camera": {
"device": 0,
"width": 1280,
"height": 720,
"fps": 60
},
"detection": {
"confidence_threshold": 0.5,
"model": "yolov8n.pt"
@Lucassifoni
Lucassifoni / recipe.txt
Created September 21, 2025 15:59
Lentils burgers
INGREDIENTS
1 cup dried green lentils (2 1/4 cups cooked)
2 1/4 cups water
1 tsp dried parsley
1 1/4 cups finely chopped red onion
3 cups finely chopped mixed mushrooms
1 1/2 cups finely chopped kale or spinach
1 tbsp olive or coconut oil
3/4 cup walnuts, finely chopped
1 1/2 cups whole wheat bread crumbs (gluten free if you wish)
@Lucassifoni
Lucassifoni / edit.html.eex
Created March 17, 2021 14:53
HTML Juggler
<h2><%= @page.post_title |> Phoenix.HTML.raw %></h2>
<div class="workspace">
<div class="content_old" style="flex: 0 0 50%; background: #ccc; padding: 1em;">
<%= @page.post_content |> Phoenix.HTML.raw %>
</div>
<div class="content_highlighter" style="flex: 0 0 50%; background: #f8f8f8; padding: 1em;">
<%= @page.post_content |> Phoenix.HTML.raw %>
</div>
</div>
@Lucassifoni
Lucassifoni / gist:3f5c118f4701a3afe4e495b6029cb6a5
Created November 13, 2020 14:06
Old mysql authentification format (mysql_native_password) for mysql >= 8.0
mysql> create database things;
mysql> create user "name@server" identified with mysql_native_password "password";
mysql> grant all privileges on things.* to "name@server";
mysql> flush privileges;
@Lucassifoni
Lucassifoni / gist:5fd644d88681bf9e9ab9f5f6b2e9018a
Created March 4, 2020 13:38
Mount ext4 volume on hackintosh
sudo ext4fuse /dev/disk2s1 /Users/lucas/Desktop/linux -o allow_other
@Lucassifoni
Lucassifoni / gist:d820e6691a29d387c6c083bd24c7fb57
Last active June 11, 2022 14:48
Phoenix websocket behind nginx with ssl
location /wsapp/ {
proxy_pass http://wsbackend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
@Lucassifoni
Lucassifoni / endpoint.ex
Created October 15, 2019 18:18
Elixir / Phoenix Stripe Webhook handling
plug Plug.Parsers,
parsers: [App.RawBodyPlug, :urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Phoenix.json_library()
@Lucassifoni
Lucassifoni / gist:25d48e03b6f9553de1205d39a0005a32
Created September 4, 2019 19:12
Convert X to mp3s in a folder
find . -name "*.wav" -exec ffmpeg -i {} -ab 160k -map_metadata 0 -id3v2_version 3 {}.mp3 \;
@Lucassifoni
Lucassifoni / downsample.sh
Created June 28, 2019 17:29
Downsample images in a PDF file with Ghostscript
#!/env/bin/bash
gs \
-o downsampled.pdf \
-sDEVICE=pdfwrite \
-dDownsampleColorImages=true \
-dDownsampleGrayImages=true \
-dDownsampleMonoImages=true \
-dColorImageResolution=72 \
-dGrayImageResolution=72 \
-dMonoImageResolution=72 \