I hereby claim:
- I am pierew on github.
- I am pierewoehl (https://keybase.io/pierewoehl) on keybase.
- I have a public key whose fingerprint is EC1E 3F6F 8DF2 997B A76E F342 4210 2485 ABC5 2826
To claim this, I am signing this object:
| # Gets the IP address of a computer via the MAC address. This will only work on LAN | |
| # segments. By default we'll scan the ARP table, but then defer to an IP scan to | |
| # as needed. | |
| # | |
| # Usage: $returnIpAddress = GetIPFromMAC "12-43-de-52-a9-99" "192.168.10." | |
| # Pass in the mac address with dashes (-) as the first parameter | |
| # Pass in an IP address with the last number missing, be sure to include the trailing "." | |
| # Be sure to check the value if $returnIpAddress -eq $null to see if a value was actually returned | |
| # | |
| function GetIPFromMAC { |
| <?php | |
| /** | |
| * @author Piere Woehl <woehlpiere@googlemail.com> | |
| */ | |
| $connection | |
| function queryDB($SQL,$FIELD) { | |
| initDB(); // Abstract Function, you have to create yourself | |
| global $connection; | |
| $result = mysqli_fetch_assoc($connection->query($SQL, MYSQLI_USE_RESULT)); |
| checkofscreen=$(ps aux | grep /usr/bin/screen | grep -v grep) | |
| if [ -z "$checkofscreen" ] | |
| then | |
| screen | |
| fi |
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "No Domain specified" | |
| echo "Usage: uber-add-domain <domain.tld>" | |
| else | |
| uberspace-add-domain -w -d $1 | |
| echo "CREATE Webserver Folder @ /var/www/virtual/$USER/$1" | |
| mkdir /var/www/virtual/$USER/$1 | |
| echo "[OK]" | |
| fi |
| # As Bash Alias | |
| function vzenter() { | |
| vzctl enter $(vzlist | egrep "$1" | awk '{print $1}') | |
| } |
| #!/bin/bash | |
| function dependencies() { | |
| echo "Check for dependencies" | |
| echo "Check: w3m" | |
| if [[ "" =~ "$(which w3m)" ]]; then | |
| echo "w3m [Install]" | |
| sudo pacman -Sy --noconfirm w3m | |
| fi | |
| echo "w3m [OK]" | |
| echo "Check: arch-wiki-lite" |
| echo "Install Minimal X Environment & Midori & PWGen" | |
| yum groups install -y base-x | |
| yum install -y unclutter openbox lightdm midori xterm | |
| clear | |
| echo "Configure RC.Local" | |
| touch /etc/rc.d/rc.local | |
| echo '#!/bin/bash' >> /etc/rc.d/rc.local | |
| echo 'lightdm' >> /etc/rc.d/rc.local | |
| chmod +x /etc/rc.d/rc.local | |
| echo "Configure LightDM" |
| #!/bin/bash | |
| # Required Stuff | |
| # * sed | |
| # * grep | |
| # * egrep | |
| # * avahi-browse | |
| # * cut | |
| # * sort | |
| # * awk | |
| # |
| /* | |
| * You need to set the Parameter $ResultSet to your Direct Result From $db->query("Select ...", MYSQLI_USE_RESULT) | |
| * | |
| * | |
| */ | |
| function arrayConvertMySQLToPHP($ResultSet) { | |
| $phparray = array(); | |
| while($row = mysqli_fetch_assoc($ResultSet)){ | |
| array_push($phparray, $row); | |
| } |
I hereby claim:
To claim this, I am signing this object: