For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| --- | |
| hosts: all | |
| tasks: | |
| - name: add github ssh key | |
| copy: > | |
| src=files/id_rsa.github | |
| dest=/root/.ssh/id_rsa.github | |
| owner=root | |
| group=root |
| ### java -jar | |
| java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar | |
| ### Maven | |
| Debug Spring Boot app with Maven: | |
| mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001" |
| import javax.crypto.Mac; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import java.io.UnsupportedEncodingException; | |
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| public class HMAC { | |
| public static void main(String[] args) throws Exception { | |
| System.out.println(hmacDigest("The quick brown fox jumps over the lazy dog", "key", "HmacSHA1")); | |
| } |
| #! /bin/sh | |
| # /etc/init.d/kafka: start the kafka daemon. | |
| # chkconfig: - 80 20 | |
| # description: kafka | |
| KAFKA_HOME=/usr/share/kafka | |
| KAFKA_USER=root | |
| KAFKA_SCRIPT=$KAFKA_HOME/bin/kafka-server-start.sh | |
| KAFKA_CONFIG=$KAFKA_HOME/config/server.properties |
| // JVM sizing options | |
| -server -Xms40g -Xmx40g -XX:MaxDirectMemorySize=4096m -XX:PermSize=256m -XX:MaxPermSize=256m | |
| // Young generation options | |
| -XX:NewSize=6g -XX:MaxNewSize=6g -XX:+UseParNewGC -XX:MaxTenuringThreshold=2 -XX:SurvivorRatio=8 -XX:+UnlockDiagnosticVMOptions -XX:ParGCCardsPerStrideChunk=32768 | |
| // Old generation options | |
| -XX:+UseConcMarkSweepGC -XX:CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly | |
| // Other options | |
| -XX:+AlwaysPreTouch -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow |
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |