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
| const toRadians = (inDegrees) => (inDegrees * Math.PI) / 180 | |
| /** | |
| * Calculate an angle direction in a two-dimensional plane | |
| * @param {degrees} 360º [0 -> [x=1 y=0], 90 -> [x=0 y=1], 180 -> [x=-1 y=0]] | |
| */ | |
| function calculateDirection(degrees) { | |
| const angle = toRadians(degrees) | |
| const x = Math.round(Math.cos(angle)) | |
| const y = Math.round(Math.sin(angle)) |
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 | |
| set -e | |
| CURRENT_NAME="Zauberantrag" | |
| CURRENT_OTP="zauberantrag" | |
| NEW_NAME="Wunderantrag" | |
| NEW_OTP="wunderantrag" |
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
| XVFB=/usr/bin/Xvfb | |
| XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" | |
| PIDFILE=/var/run/xvfb.pid | |
| case "$1" in | |
| start) | |
| echo -n "Starting virtual X frame buffer: Xvfb" | |
| start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
| echo "." | |
| ;; | |
| stop) |