Skip to content

Instantly share code, notes, and snippets.

View ymollard's full-sized avatar
🐧
Art, engineering & digital training

Yoan Mollard ymollard

🐧
Art, engineering & digital training
View GitHub Profile
@ymollard
ymollard / find_busy_port.md
Created August 15, 2019 19:41
Find who's occupying a port
sudo lsof -i:53
@ymollard
ymollard / temporary_connect.md
Created September 16, 2019 14:08
Temprarily access to the web
sudo mv /etc/netplan/10-arbalet.yaml /etc/netplan/.10-arbalet.yaml
sudo reboot
sudo service arbalet stop
cd frontage/prod
docker-composer down
sudo service systemd-resolved restart
ping debian.org    # Should work, or force the DHCP client:
# dhclient enp0s31f6 -v
[
[
[
{
"universe": 7,
"dmx": 18
},
{
"universe": 6,
"dmx": 18

Histogram and density plot

plt.hist(counts, bins=30) (where 30 is the number of desired bins)

otherwise with pandas: pd.Series(count).hist()
pd.Series(temperatures) - the occurrences variable is not needed
ssh pi@rosa.local
sudo service ioservice stop

python3 rosa-master/rpi/ws_server.py --verbose
Server up and running.

#  Connexion Python

Exception in thread Thread-5:
@ymollard
ymollard / captures_to_gif.bash
Created August 14, 2020 08:39
Crop screen captures and make a gif
#!/bin/bash
# Change +0+0 (+w+h) to select the upper left point of the rectangle to be cropped
for i in *png; do convert "$i" -crop 1920x1080+0+0 "cropped-$i"; done;
mkdir cropped && mv cropped*png cropped && cd cropped
convert -delay 10 *.png +repage animated.gif
{
"apps": [
"Flags",
"RandomFlashing",
"SweepRand",
"SweepAsync",
"Tetris",
"Snake",
"Drawing"
],
@ymollard
ymollard / config.json
Created September 26, 2020 17:32 — forked from EtienneSchmitz/config.json
Frontage/Bordeaux
{
"apps": [
"Flags",
"RandomFlashing",
"SweepRand",
"SweepAsync",
"Tetris",
"Snake",
"Drawing"
],
git clone git clone https://github.com/arbalet-project/frontage-frontend.git -b ionic_5
cd frontage-frontend
npm i
ionic build
# Generate assets with cordova
ionic capacitor open ios # Close Xcode then
npm install -g cordova-res
cordova-res ios
wget https://gist.githubusercontent.com/dalezak/a6b1de39091f4ace220695d72717ac71/raw/3c858045b84dab9d39bd53cb2d19fba3e523bef4/resources.js