- 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/passwd
and change/bin/bash
and/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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend http | |
bind *:80 | |
timeout client 60s | |
mode http | |
default_backend demo-apps | |
backend demo-apps | |
timeout connect 10s | |
timeout server 100s | |
mode http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend http | |
bind *:80 | |
timeout client 60s | |
mode http | |
default_backend demo-apps | |
backend demo-app1 | |
timeout connect 10s | |
timeout server 100s | |
mode http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend http | |
bind *:80 | |
timeout client 60s | |
mode http | |
acl app1 path_end -i /app1 | |
acl app2 path_end -i /app2 | |
use_backend demo-app1 if app1 | |
use_backend demo-app2 if app2 | |
default_backend demo-apps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rm setup.py | |
rm -rf *.egg.info build/ dist/ | |
curl -s https://raw.githubusercontent.com/lamoboos223/general/main/lama-logo.sh | bash | |
echo "Creating setup.py file, please submit the package info below." | |
echo "Library Name (will be displayed on the pypi)?" | |
read name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << "EOF" | |
_ ____ _____ | |
| | / __ \ / ____| | |
| | __ _ _ __ ___ __ _ | | | | (___ | |
| | / _\ | '_ ` _ \ / _` | | | | |\___ \ Lama Alosaimi ❤️ | |
| |___| (_| | | | | | | (_| | | |__| |____) | Linkedin 👉🏻 https://www.linkedin.com/in/lama-alosaimi | |
|______\__,_|_| |_| |_|\__,_| \____/|_____/ Medium 👉🏻 https://medium.com/@lalosaimi | |
_,. | |
,` -.) | |
'( _/'-\\-. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backup SD card to image named backup-25-10-2019.dmg | |
sudo dd if=/dev/disk2 of=~/backup-25-10-2019.dmg bs=4m | |
# burn backup image to SD card | |
sudo dd if=~/backup-25-10-2019.dmg of=/dev/disk2 bs=4m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get public ip address | |
ip=$(curl https://api.ipify.org) | |
# Update noip dns using the public ip address | |
curl --location --request GET 'https://dynupdate.no-ip.com/nic/update?hostname=<my-dns-in-noip>&myip=$ip' \ | |
--header 'Authorization: Basic <email:password>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://raw.githubusercontent.com/lamoboos223/general/main/lama-logo.sh | bash | |
sudo yum update | |
# TODO: make sure the OpenJDK is 11 and set JAVA_HOME env var | |
# TODO: change this line handler.FILE.fileName=C\:\\development\\keycloak-16.1.1\\standalone\\log\\server.log in C:\development\keycloak-16.1.1\standalone\configuration\logging.properties | |
# sudo apt-get install default-jdk -y | |
sudo yum-repository ppa:openjdk-r/ppa | |
sudo yum update | |
sudo yum install openjdk-11-jdk | |
cd /opt |