- Connect to your raspberry Pi with SSH
- Install zsh :
sudo apt-get update && sudo apt-get install zsh - Edit your passwd configuration file to tell which shell to use for user
pi:sudo vim /etc/passwdand change/bin/bashand/bin/zsh - Reconnect to your raspberry, and check that zsh is the shell with
echo $0. - Switch to root :
sudo su - Install OhMyZsh :
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" - Disconnect from your instance and reconnect it.
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.
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/)
- Connect to your EC2 instance
- Install zsh :
sudo apt-get update && sudo apt-get install zsh - Edit your passwd configuration file to tell which shell to use for user
ubuntu:sudo vim /etc/passwd - Look for
ubuntuuser, and replacebin/bashbybin/zsh - Install OhMyZsh :
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" - Disconnect from your instance and reconnect it.
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
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.
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