Skip to content

Instantly share code, notes, and snippets.

@ekanant
ekanant / cleanup.sh
Last active August 15, 2019 16:37 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="
/etc/ceph \
/run/secrets/kubernetes.io \
/run/calico \
/run/flannel \
/var/lib/calico \
/var/lib/kubelet \
@ekanant
ekanant / jwtRS256.sh
Last active March 15, 2018 12:02 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
#If you want in PK8 (Can put it in java String)
openssl pkcs8 -topk8 -in jwtRS256.key -nocrypt -out jwtRS256.pk8.key
cat jwtRS256.key
cat jwtRS256.key.pub
package chemp.notes.linenotify;
import java.io.*;
import java.net.*;
import java.util.regex.Pattern;
public class LineNotify {
private static final String strEndpoint = "https://notify-api.line.me/api/notify";
public boolean callEvent(String token, String message) {
boolean result = false;