- https://gist.github.com/mansouryaacoubi/aed3a3c89960ee9b4aa0592c530a2d11
- Flash Raspbian with Win32DiskImager
- https://gist.github.com/mansouryaacoubi/544ae11fe127c52a50de5f99530ab157
- Connect with pi@raspberrypi.local 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 mansour@raspberrypi.local
- 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 mansour@.local
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
title Checking active hosts | |
@echo off | |
color FC | |
:start | |
cls | |
echo Ping MYServer001... | |
ping -n 1 myserver001.yaacoubi.com | find "TTL=" >nul | |
if errorlevel 1 ( | |
echo HOST NOT REACHABLE | |
timeout 3 |
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
@echo off | |
set /p SSID="Please enter WiFi SSID: " | |
set keyfile=%SSID%_key.txt | |
set | |
echo Retrieving security key for %SSID%... | |
netsh WLAN show profile name="%SSID%" key=clear >%keyfile% | |
echo Security key was successfully saved in %keyfile%. |
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/bash | |
# @author Mansour Yaacoubi | |
# @filename setbg.sh | |
# @version 2.3 | |
# @task Sets background in Ubuntu and some other Linux versions | |
# @feature When this script runs as superuser, | |
# the command 'setbg' can be installed into /bin directory | |
# @timestamp 15:53 12.06.2017 | |
# @usage ./setbg.sh wallpaper.jpg | |
# su $USER -c setbg.sh wallpaper.jpg |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/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 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
function disableLocationRequest() { | |
var workaroundFunc = function(successCallback=null, errorCallback=null, options=null) { | |
console.warn('User Location Request disabled'); | |
}; | |
// Backup native code | |
navigator.geolocation.old_getCurrentPosition = navigator.geolocation.getCurrentPosition; | |
navigator.geolocation.old_watchPosition = navigator.geolocation.watchPosition; | |
// Disable original behaviour | |
navigator.geolocation.getCurrentPosition = workaroundFunc; | |
navigator.geolocation.watchPosition = workaroundFunc; |
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
Array.prototype.occurrences = function(val) { | |
var i = 0, c = 0; | |
while( (i = this.indexOf(val,i)+1) && ++c ); | |
return c; | |
}; |
Set Environment Variables to C:\Program Files\Python36; C:\Program Files\Python36\Scripts\
- PyWin32: https://sourceforge.net/projects/pywin32/files/pywin32/
- Requests: pip install requests
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
REM @autor Mansour Yaacoubi | |
REM @version 1.5.1 | |
REM @description A batch processing file to setup | |
REM @changelog Bugfix for to early drive mount (Internet connection check), | |
REM added FH-Aachen BSCW Cloud Service, added functionality to re- and deinstall, | |
REM unmounts drives at deinstallation | |
@echo off | |
cd\ | |
color 74 |