HackerSchool: Sicher im Netz

Dies ist ein Entwurf für einen Kurs bei der HackerSchool zum Thema Sicherheit im Netz.
Keep reading →Dies ist ein Entwurf für einen Kurs bei der HackerSchool zum Thema Sicherheit im Netz.
Keep reading →Dies ist die Kursbeschreibung für den HTML / CSS Anfängerkurs der im Rahmen der HackerSchool for Girls entstanden ist.
Keep reading →Dies ist ein Kursentwurf für einen WordPress Kurs der für die HackerSchool entstanden ist.
Just comming home from DevopsCon Munich where i was speaking at about “Best Practices for delivering secure WebAPIS”. API Security is realy something that i’m keen on talking about so i was looking forward to do my Session. Keep reading →
I was looking into a LAMP Server these days and had one effect that some pages became unresponsive over time. While the Error was not easy to detect and fix we decided to create a check script to check a certain URL and in case of a timeout server services would be restarted automatically. Not the bast possible way but maybe the most straight forward one.
Please adjust the service commands on the top to have the right restart commands inside.
#! /usr/bin/bash
function restart {
service nginx restart
service mariadb restart
service httpd restart
}
function check {
if [ $? -ne 0 ] ; then
echo "Error occurred getting URL $1:"
if [ $? -eq 6 ]; then
echo "Unable to resolve host"
fi
if [ $? -eq 7 ]; then
echo "Unable to connect to host"
restart;
fi
restart;
exit 1
fi
}
Call for this script looks like…
/scripts/check.sh http://www.URLTOCHECK.io
Cron like
*/15 * * * * /scripts/check.sh http://www.URLTOCHECK.io
As part of my private life i sometimes help friends with their Webservers. Recently i had a case of a LAMP Server including Maria / MySQL DB. Some Queries lasted “forever” in the DB and consumed a lot of CPU. I created small script which looks into the DB and kills thoos querys.
This Script was done for a Server where the Password of MySQL is stored in a File (Plesk) Therefore the -p Command contains a cat of the password. Please adjust the script to take the right username and password.
#!/bin/sh
# Kill long Mysql Queries
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -ANe"SELECT id FROM information_schema.processlist WHERE time > 360;" | cut -d: -f2 |\
while read id
do
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -ANe"kill $id;"
done
Cron looks like this to check this all 10 minutes and not receive any notification about it.
*/10 * * * * /root/killlongdbqueries.sh >/dev/null 2>&1
After updating my Synolog DS216play to DSM6 i had issues with my external USB3.0 Drive which i use for Backups. It was no longer detected. After opening a Support Case and some forward and backward emails they team has implemented a solution.
They created a task in the task planer which runs on bootup by root and does execute this code:
rmmod dwc3-st.ko;
sleep 3;
rmmod phy-st-usb3.ko;
sleep 1;
insmod /lib/modules/phy-st-usb3.ko miphy_ssc_off=1;
insmod /lib/modules/dwc3-st.ko;
Then i had to execute this actions.
Now its working fine again.
This year is amazing. Right before the Nordic APIs Event i’ll have the oportunity to present at APIDAYS BERLIN & APISTRAT EUROPE 2015 . I personaly feel that the Europe seems to wake up on APIs and especialy Germany right now. Pretty amazing times. More about the content of my speach during the next days.
I’m thrilled to speak at Nordic APIs Tour 2015 in London, Copenhagen and Munich. My topic will focus on
The Zeitgeist of Modern IT
more Details to come in the next days!
In a lot of Situations people Mix REST vs. SOAP with the discussion about XML and JSON not considering that REST can transport both formats.
I found an interessting article which provides a good intro and a good conclusion.
http://www.programmableweb.com/news/xml-vs.-json-primer/how-to/2013/11/07