Skip to content

Instantly share code, notes, and snippets.

@jonentropy
jonentropy / five_longest_classes_in_java_codebase.sh
Created May 31, 2018 14:26 — forked from breun/five_longest_classes_in_java_codebase.sh
Find the five longest class names in a Java codebase.
find . -name '*.java' -exec basename {} .java \; | awk '{ print length " " $0 }' | sort -n -r | head -n 5
@jonentropy
jonentropy / SSHDServer.java
Last active September 11, 2015 09:53 — forked from jdennaho/SSHDServer.java
How to use a PublickeyAuthenticator with Apache MINA SSHD
private static final String knownKey = "{SSH2.PUBLIC.KEY}";
public void start() {
SshServer sshd = SshServer.setUpDefaultServer();
sshd.setPort(22999);
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
sshd.setPublickeyAuthenticator(new PublickeyAuthenticator() {
public boolean authenticate(String username, PublicKey key, ServerSession session) {
if(key instanceof RSAPublicKey) {
import java.io.Writer;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGL11;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;

Keybase proof

I hereby claim:

  • I am tristan2468 on github.
  • I am tris2468 (https://keybase.io/tris2468) on keybase.
  • I have a public key whose fingerprint is D332 48DD 68D5 4DED 5F51 193C 4633 EA65 6F9A 0E18

To claim this, I am signing this object:

@jonentropy
jonentropy / take_screenshot.sh
Last active December 11, 2015 10:19
Android screenshot.
adb shell /system/bin/screencap -p /sdcard/img.png
adb pull /sdcard/img.png ~/img.png
@jonentropy
jonentropy / mountrw.sh
Created January 21, 2013 13:09
Mount readwrite Android
mount -o rw,remount /system
@jonentropy
jonentropy / bootanimation.sh
Created January 15, 2013 16:45
Make bootanimation.zip
7z a -mx0 bootanimation.zip desc.txt part0/
# Update all git repos in a directory by calling git pull
#
#
#Init
FAILED_DIRS=()
FAILED_MSGS=()
UPDATED_REPOS=()
NUM_FAILED=0