Skip to content

Instantly share code, notes, and snippets.

View meisterk's full-sized avatar

Franz Kohnle meisterk

View GitHub Profile
@meisterk
meisterk / git-config.txt
Created May 14, 2020 06:54
Config Proxy-Server for git
git config --global http.proxy http://192.168.100.1:8080
@meisterk
meisterk / mysql-authentication.sql
Last active May 15, 2020 11:38
Change authentication method for mysql root.
ALTER USER 'root'@'localhost' IDENTIFIED with mysql_native_password BY 'mysql';
@meisterk
meisterk / formular-und-auswertung.php
Last active March 23, 2020 10:20
HTML-Formular mit PHP-Auswertung
<h1>PHP-Skript mit Formular</h1>
<h2>Formular</h2>
<form method="post" action="">
<input type="text" name="vorname" value="">
<input type="text" name="nachname" value="">
<input type="submit" name="begruessen" value="Begrüßen">
</form>
<h2>Auswertung</h2>
<?php
@meisterk
meisterk / localstorage.js
Created March 22, 2020 09:37
Read an write to localstorage
// READ FROM LOCALSTORAGE
if(localStorage.getItem('data')){
let dataString = localStorage.getItem('data');
dataArray = JSON.parse(dataString);
}else{
dataArray = [];
}
// WRITE TO LOCALSTORAGE
let dataString = JSON.stringify(dataArray);
@meisterk
meisterk / linkliste.sh
Created August 1, 2018 11:05
Erzeugt HTML-Liste mit Links zu den Dateien im Verzeichnis "verzeichnis"
for datei in $(ls -1 verzeichnis)
do
echo "<li><a href=\"/wp-content/uploads/2018/08/$datei\"></a> ()</li>"
done
@meisterk
meisterk / summary.sh
Last active June 29, 2020 19:08
Include sourcecode of all html,- php-, css- and js-files in a directory and its subdirectories in one textfile
#!/bin/bash
# creates a file ${NAME}.txt for every subdirectory in current directory
# the content of all .html, .php, .css and .js-files is included in this one file
for NAME in $( ls -1 ); do
if [ -d $NAME ]; then # only directories
echo '=========================' > ${NAME}.txt
echo ' '$NAME >> ${NAME}.txt
echo '=========================' >> ${NAME}.txt