Skip to content

Instantly share code, notes, and snippets.

🌱
Focusing

Anthony Reinette anthonyray

🌱
Focusing
Block or report user

Report or block anthonyray

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
@anthonyray
anthonyray / kiosk.md
Created Sep 6, 2019
Turn your Raspberry Pi into a kiosk playing looping videos
View kiosk.md

An acquaintance needed a video kiosk that plays looping videos for an exposition booth. Since I have a bunch of Raspberry Pis lying around, I figured that it would be the perfect use case for using one of them.

Let's assume we start from scratch, with a unflashed, brand new SD card and your Raspberry Pi.

Installing the OS

Install a version of Raspbian that includes the desktop. You can head over to : https://www.raspberrypi.org/downloads/raspbian/ and follow the instructions.

Once the image is downloaded, you can burn it to your SD card with tools like Etcher (https://www.balena.io/etcher/)

@anthonyray
anthonyray / README.md
Last active Sep 20, 2017
One liner to take a picture from a remote Raspberry Pi and see it in your terminal
View README.md

Instructions

  1. On your Raspberry Pi, enable SSH.

  2. On your laptop, copy your SSH keys to your Raspberry with ssh-copy-id pi@<your-raspi-hostname>.local.

  3. Install fswebcam with sudo apt-get install fswebcam.

  4. From a terminal on your computer, you can issue a :

@anthonyray
anthonyray / README.md
Last active Aug 18, 2017
Squashing commits in a branch before merging the branch into master
View README.md

Let's say you've been working for several hours on a feature branch. In the process, you pushed a important number of commits. If you were to directly merge the feature branch into the master branch, you would mess up the history of commits in the master branch.

Here is how you can squash commits from a feature branch before merging the feature branch into the master branch.

We'll go through this process by following an example :

Let's say we have a feature branch. This branch has an important number of commits you'd like to squash before merging the branch into master.

@anthonyray
anthonyray / readme.md
Last active Mar 23, 2017
Setting up OhMyZsh on a rapsberry Pi
View readme.md
  1. Connect to your raspberry Pi with SSH
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user pi : sudo vim /etc/passwd and change /bin/bash and /bin/zsh
  4. Reconnect to your raspberry, and check that zsh is the shell with echo $0.
  5. Switch to root : sudo su
  6. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  7. Disconnect from your instance and reconnect it.
@anthonyray
anthonyray / gist:398fde676a7704c03d6624155ba0011e
Last active May 20, 2020
Set up OhMyZsh on Amazon EC2 instance running Ubuntu Server 14.04
View gist:398fde676a7704c03d6624155ba0011e
  1. Connect to your EC2 instance
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user ubuntu : sudo vim /etc/passwd
  4. Look for ubuntu user, and replace bin/bash by bin/zsh
  5. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  6. Disconnect from your instance and reconnect it.
@anthonyray
anthonyray / tipsntricks.md
Created Feb 22, 2017
Android Tips & Tricks
View tipsntricks.md

Android Tips and Tricks

Debugging

  • Listing activities in the back stack of the current stack : adb shell dumpsys activity activities
  • Listing activities in the back stack of the current stack (less verbose) : adb shell dumpsys activity activities | grep -i run
@anthonyray
anthonyray / gist:4f1d6845af7d35608de9
Last active Aug 29, 2015
EM file error when using browserify and react.
View gist:4f1d6845af7d35608de9

I am using gulp and browserify to structure my javascript application built with reactjs. One day, when I was bundling my javascript files into a single one, I stumbled upon this error :

➜  front git:(frontend) ✗ gulp browserify
[11:02:49] Using gulpfile ~/xxx/xxx/xxx/xxx/front/gulpfile.js
[11:02:49] Starting 'browserify'...

events.js:72
        throw er; // Unhandled 'error' event
@anthonyray
anthonyray / gist:dd9895504040a0e54278
Last active Sep 21, 2017
Connecting Python to a MySQL database
View gist:dd9895504040a0e54278

I had a hard time installing a python connector to a MySQL database. I tried to install MySQLdb but had problems during compilation. Fortunately, MySQL release a connector written in Python. I wanted to install it in a virtual environnement.

To do so :

venv environnement
cd environnement 
source bin/activate
You can’t perform that action at this time.