- https://gist.github.com/mansouryaacoubi/aed3a3c89960ee9b4aa0592c530a2d11
- Flash Raspbian with Win32DiskImager
- https://gist.github.com/mansouryaacoubi/544ae11fe127c52a50de5f99530ab157
- Connect with [email protected] and Password:raspberry
- sudo cp /boot/config-rpi.sh ~ && sudo chown $USER:$USER config-rpi.sh && sudo ./config-rpi.sh
- Enter new username and password
- Reboot and login as [email protected]
- sudo cp /boot/config-rpi.sh ~ && sudo chown $USER:$USER config-rpi.sh && sudo ./config-rpi.sh
- Enter WIFI-Data and configure Raspi
- Reboot and login as [email protected]
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/bash | |
# @author Mansour Yaacoubi | |
# @filename config-rpi.sh | |
################# CHECK WHETHER SCRIPT IS RUNNING AS ROOT ################# | |
# Run script as root (higher privileges) | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit 1 | |
else |
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
alias cls=clear | |
alias c=clear | |
alias x=exit | |
alias l='ls -lisah' | |
alias ld='du -h | sort -nr | head -n 10' # large directories |
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/bash | |
# @usage bash <(curl -s https://gist.githubusercontent.com/mansouryaacoubi/0582fe108f699956c677b95e24c71e9a/raw/73c7ce97257eb76a4d2c3a1b4c7243f8efdf0355/dl-tools.sh) | |
cd ~ | |
echo "download .bash_aliases" | |
wget https://gist.githubusercontent.com/mansouryaacoubi/e3454417d57858dec9273e5503132670/raw/81f0e701d9114e9a8bd6fc94a71f0d7499acb884/.bash_aliases >/dev/null 2>&1 | |
echo " create directory tools" | |
mkdir tools | |
echo " change directory" |
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/bash | |
# @author Mansour Yaacoubi | |
# @filename update-rpi.sh | |
# @task Installs new updates and specific programs | |
################# CHECK WHETHER SCRIPT IS RUNNING AS ROOT ################# | |
# Run script as root (higher privileges) | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit 1 |
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/bash | |
# @author Mansour Yaacoubi | |
# @filename addwifi.sh | |
# @usage sudo ./addwifi.sh "SSID" "WPA-Key" | |
# @task adds wifi to the wpa_supplicant file and reconfigures wpa_cli | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit 1 | |
else |
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
REM @author Mansour Yaacoubi | |
REM @filename cleanformatdisk.bat | |
REM @task Cleans disk, creates primary partition and formats disk | |
REM f.e. for raspberry pi drives before writing new image of SD-Card | |
@echo off | |
cls | |
net session >nul 2>&1 | |
IF %ERRORLEVEL% == 0 GOTO START | |
echo Please run this batch as administrator |
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
# @author Mansour Yaacoubi | |
# @filename enable_rpi_otg.py | |
# @task Enable ssh over USB for Raspberry Pi | |
# | |
# Install pywin32 for this (https://sourceforge.net/projects/pywin32/files/pywin32/) | |
import win32api, pywintypes | |
import requests | |
from time import sleep |
- Download the correct *.cab file from: Microsoft Update
- Extract *.cab file
- Execute
pnputil -i -a RNDIS.inf
with higher privileges