Log Levels - RFC 5424.
This levels only needs to be findable for debugging purposes.
Eval { | |
Jit = true | |
} |
This levels only needs to be findable for debugging purposes.
<?php | |
/** | |
* Check if two dates are "almost" equal. | |
* | |
* @param \DateTime $date1 | |
* @param \DateTime $date2 | |
* @param int $maxDiffSeconds | |
*/ | |
public function assertDatesAreEqual(\DateTime $date1, \DateTime $date2, $maxDiffSeconds=59) |
<?php | |
/** | |
* This file generates a new package.json on STDOUT, that will | |
* include the other package.json files. | |
* | |
* @author Julius Beckmann <beckmann@silpion.de> | |
* | |
* Documentation on this: | |
* https://github.com/composer/composer/blob/c849f7d05d4eb5e585c34c83bd41341bc144f0d0/doc/05-repositories.md |
<?hh | |
/** | |
* Solution for the Programmierwetbewerb by Silpion | |
* for the Firmenkontaktmesse at FH-Wedel. | |
* | |
* @author Julius Beckmann | |
* | |
*/ | |
type Point = Pair<int, int>; |
# Write the ServerName for apache2 in a custom config file: | |
echo 'ServerName localhost' > /etc/apache2/conf.d/servername | |
# Restart d'a Server! | |
service apache2 restart |
which smartctl || sudo apt-get -y install smartmontools | |
which php || sudo apt-get -y install php5-cli | |
[ -f smart.php ] || wget https://gist.githubusercontent.com/h4cc/a2163b697469d847cd4a/raw/a04e2645d3c5f22625f3efaa28a4f604912b2792/smart.php | |
for disk in /dev/sd[a-z] | |
do | |
echo $disk | |
sudo smartctl --attributes $disk | php smart.php | |
done |
#!/bin/sh | |
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation. | |
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" | |
# Using current screen orientation proceed to rotate screen and input devices. | |
case "$rotation" in |
# Some handy commands i dont like to google the way down every time: | |
# List files by changed timestamp in current folder | |
find . -type f -printf '%T@ %p\n' | sort -n -r | cut -f2- -d" " | sed -e 's,^./,,' | xargs ls -U -l | |
# Files writeable by "others" in current folder | |
find . -type d -perm /o+w | |
# Files writeable by current "group" in current folder | |
find . -type d -perm /g+w | |
# Files writeable by current "user" in current folder |