run postgresql with systemctl
sudo pacman -S postgresql
find version & build from source
convert google takeout archive for location history from kml to gpx and split file into one per day
gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 gpxsplitter.py split.gpx
version: '3.3' | |
services: | |
keycloak: | |
image: jboss/keycloak-mysql | |
environment: | |
- constraint:serverclass==gateway | |
- PROXY_ADDRESS_FORWARDING=true | |
- MYSQL_USER=keycloak |
// svgPathToCommands('M10,10 l 5,7 C-5,7.2,.3-16,24,10 z'); | |
// | |
// produces: | |
// | |
// [ { marker: "M", values: [ 10, 10 ] }, | |
// { marker: "l", values: [ 5, 7 ] }, | |
// { marker: "C", values: [ -5, 7.2, 0.3, -16, 24, 10 ] }, | |
// { marker: "z", values: [ ] } ] | |
// | |
// commandsToSvgPath(svgPathToCommands('M10,10 l 5,7 C-5,7.2,.3-16,24,10 z')) |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
/** | |
* Different case matchers | |
* | |
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</ | |
*/ | |
sealed class CaseMatcher(private val regex: Regex) { | |
open fun notMatches(source: String?): Boolean { | |
return !matches(source) | |
} |
DEVICE=1.2.3.4
MIRROR=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases
FEDORA=29
FILE=tcpdump-4.9.2-6.fc29.armv7hl.rpm
PACKAGE=Everything/armhfp/os/Packages/t/$FILE
wget $MIRROR/$FEDORA/$PACKAGE
# see https://gist.github.com/cfstras/4856e48fd4d68eb7debaa20d5e63c6de
@echo off | |
setlocal | |
call :setESC | |
cls | |
echo %ESC%[101;93m STYLES %ESC%[0m | |
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m | |
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m | |
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m |
#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |