Skip to content

Instantly share code, notes, and snippets.

View Pilooz's full-sized avatar

Pierre-Gilles Levallois Pilooz

  • Freelancer
  • France
View GitHub Profile
@Pilooz
Pilooz / gist:3422b1bc70f207838cebc4e631c471ad
Last active November 5, 2019 09:53
Serial communication between two arduinos

Sender (This is a Feather)

#include <Arduino.h>

void setup() {
  // Begin the Serial at 9600 Baud
  Serial.begin(115200);
  Serial1.begin(115200);
  pinMode(13, OUTPUT);
}
@Pilooz
Pilooz / example.ino
Created September 11, 2019 16:36 — forked from abcd-ca/example.ino
Example of getting unique mac address using Ethernet Featherwing
#import "macAddress.h"
void setup () {
byte mac[6];
getUniqueMacAddress(mac);
Serial.begin(115200);
Serial.print("mac: ");
for (uint8_t i = 0; i < sizeof(mac); i++) {
@Pilooz
Pilooz / web-servers.md
Created May 6, 2019 14:52 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Pilooz
Pilooz / GitCommitEmoji.md
Created January 31, 2019 12:50 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@Pilooz
Pilooz / gist:711ca18171842bec8f7d275e5a6dc116
Created July 11, 2018 13:44
Start browser at pi start
# https://blog.eq8.eu/til/raspberi-pi-as-kiosk-load-browser-on-startup-fullscreen.html
# install midori browser
sudo apt install midori
# Edit the file ~/.config/lxsession/LXDE-pi/autostart
# Add these lines :
# Auto run the browser
@xset s off
@xset -dpms
@Pilooz
Pilooz / gist:ee64de601295e6a47e5304aa1e77cee5
Last active July 8, 2019 07:46
Finishing Rapberry pi install
sudo apt-get update
sudo apt-get install vim
# Installing rmate for remote editing
sudo curl -o /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate
sudo chmod +x /usr/local/bin/rmate
sudo mv /usr/local/bin/rmate /usr/local/bin/rsubl
# A better git log https://coderwall.com/p/euwpig/a-better-git-log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
# Decomment alias 'll' in /home/pi/.bashrc
@Pilooz
Pilooz / Running a Python Script AFTER X GUI Starts up
Created December 16, 2017 09:00
Running a Python Script AFTER X GUI Starts up
-> Edit /etc/rc.local
-> put your code before "exit 0"
-> Ensure this file is executable : `sudo chmod +x /etc/rc.local`
exec 2> /tmp/rc.local.log # send stderr from rc.local to a log file
exec 1>&2 # send stdout to the same log file
/home/pi/projets/rfid-video-player/scripts/start.sh
@Pilooz
Pilooz / gist:beefa092499f42f3bddbc44da1819bf6
Created December 11, 2017 10:50
Install openCV3.3.0 on Pi 3 under Raspbian Stretch
Stretch OpenCV 3.3.0...
Following the basic build instructions from http://docs.opencv.org/2.4/doc/tutorial ... stall.html
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
git clone https://github.com/opencv/opencv.git
cd opencv
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local ..
@Pilooz
Pilooz / gist:2160aa4a23838f1383440771a03b5fe8
Last active July 8, 2018 19:19
Clean up Raspberry Raspbian Strech after install
sudo apt-get purge wolfram-engine
sudo apt-get purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove
@Pilooz
Pilooz / gist:69c71ac1a6c4b745ab7594ba145944f2
Created April 12, 2017 08:32
Launch Chromium on Raspberry in kiosk mode ...and some other cool options
chromium --disable-hang-monitor --kiosk --disable-java --disable-restore-session-state --disable-sync --disable-translate http://localhost