- 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
#!/bin/bash | |
# @usage bash <(curl -s https://gist.githubusercontent.com/mansouryaacoubi/5f0744ba2bc04a295d13239ed51f125c/raw/a31cf51544f36440faffdaf91d473d0339d35752/install-ionic.sh) | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit 1 | |
else | |
clear | |
echo |
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 | |
# Run script as root (higher privileges) | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit 1 | |
else | |
clear | |
echo | |
echo "Script is running with higher privileges as: $SUDO_USER -> $(whoami)" |
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
<?php | |
header('Content-Type: application/json'); | |
const DEFAULT_BTC_PAYOUT_ADDRESS = '1f7now3v2J56gzpYQfkmn1mv9KvcqtC6E'; | |
define('BTC_PAYOUT_ADDRESS', isset($_GET['q'])?$_GET['q']:DEFAULT_BTC_PAYOUT_ADDRESS); | |
const BASE_URL = 'http://www.groupfabric.com/pool/?q='; | |
const SEARCH_FLAG = 'set_viewmodel('; | |
const FILE_NAME = 'stats.csv'; |
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
let categories = [{id: 1, name: 'EM'},{id: 2, name: 'EW'}, {id: 3, name: 'U15M'}, {id: 4, name: 'U15W'}]; | |
let cat = null; | |
let selected = 3; | |
// VERSION 1: Use foreach-loop | |
for(var i in categories) { | |
cat = categories[i]; | |
if(cat.id == selected) { | |
break; | |
} |
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 @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 |
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 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
Array.prototype.occurrences = function(val) { | |
var i = 0, c = 0; | |
while( (i = this.indexOf(val,i)+1) && ++c ); | |
return c; | |
}; |
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
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; |