- 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 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
# take one picture and save it into file | |
raspistill -o test.jpg | |
# record a video for 10 seconds in the h264 codec | |
raspivid -o test.h264 -t 10000 | |
# GStreamer | |
gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=10/1 ! videoconvert ! x264enc tune=zerolatency ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.3.6 port=5006 sync=false | |
gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw,width=640,height=480' ! x264enc tune=zerolatency ! 'video/x-h264,stream-format=byte-stream' ! h264parse ! rtph264pay ! udpsink host=192.168.3.6 port=5006 | |
# the below is the one that worked |
This file contains 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
mvn archetype:generate | |
-DgroupId=com.example | |
-DartifactId=demo | |
-DarchetypeArtifactId=maven-archetype-quickstart | |
-DarchetypeVersion=1.4 | |
-DinteractiveMode=false |
This file contains 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
# installing all the required components to run drupal | |
apt-get install composer | |
apt-get install php8.2.0 | |
apt-get install apache2 | |
apt-get install mysql | |
# creating new drupal project using the latest recommended version | |
composer create-project drupal/recommended-project demo1 | |
# installing drush via composer | |
composer require --dev drush/drush | |
./vendor/bin/drush --version |
This file contains 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
git | |
curl | |
python3 | |
default-jdk | |
ansible | |
tomcat9 tomcat9-admin |
This file contains 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 |
This file contains 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 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 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 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 |