I hereby claim:
- I am jeffrade on github.
- I am jeffrade (https://keybase.io/jeffrade) on keybase.
- I have a public key whose fingerprint is 7720 4120 B545 1B89 1E8E 60E3 C332 9294 B0EA F9FB
To claim this, I am signing this object:
| public class NotThreadSafe { | |
| private static final NotThreadSafe INSTANCE = new NotThreadSafe(); | |
| private boolean isEven = false; | |
| private NotThreadSafe() { | |
| super(); | |
| } | |
I hereby claim:
To claim this, I am signing this object:
| import java.util.Queue; | |
| import java.util.LinkedList; | |
| public class QuickSort { | |
| private int[] arr; | |
| private Queue<int[]> queue; | |
| public QuickSort(int[] arr) { | |
| super(); |
| public class StringToBinary { | |
| // https://stackoverflow.com/a/917190 | |
| public static void main(String[] args) { | |
| final String s = args.length > 0 ? args[0] : "foo"; | |
| final byte[] bytes = s.getBytes(); | |
| StringBuilder binary = new StringBuilder(); | |
| for (byte b : bytes) { | |
| int val = b; | |
| System.out.println("byte b=" + b); |
| import java.lang.instrument.Instrumentation; | |
| /** | |
| * Let's say you have an existing application that is an executable jar file (e.g. app.jar) | |
| * Define this class a directory of your choosing. | |
| * Then create the following manifest.txt file: | |
| * <code> $ echo "Premain-Class: ExampleAgent" > manifest.txt</code> | |
| * Then create the jar file for this class: | |
| * <code> $ jar cmf manifest.txt example-agent.jar *.class</code> | |
| * Lastly, start your existing app.jar like so: |
| ########################################################## | |
| ### This file is not meant to be executed as a script! ### | |
| ### Usually found in $JAVA_HOME/bin ### | |
| ########################################################## | |
| # Simply run this when you have any Java process running (launches a GUI). Choose your pid. | |
| jconsole | |
| # Run the following three commands in succession then navigate to http://localhost:7000/: | |
| jps # To find your Java <pid> |
| /** | |
| * Prints: | |
| * creating A | |
| * creating B | |
| * in B print | |
| */ | |
| public class Main { | |
| public abstract class A { | |
| public A() { |
| #!/usr/bin/env bash | |
| # To run this script, you must checkout the NEW_REPO | |
| # repo and have it in the same dir as OLD_REPO. | |
| # | |
| # First execute the reset-repo.sh | |
| # Then execute the patch-repo-start.sh | |
| # Then execute: | |
| # $ ./patch-repo-finish.sh | |
| cd ../../NEW_REPO/ |
| #!/bin/sh | |
| if [ -z "$1" ] | |
| then | |
| echo "Please supply a domain, e.g. www.example.com" | |
| exit 1 | |
| fi | |
| echo | openssl s_client -servername $1 -connect $1:443 2>/dev/null | openssl x509 -text | |
| echo "Saving public ./cert.pem..." |
| #!/bin/bash | |
| QUEUE_DIR="./queue" | |
| COMPLETED_DIR="./completed" | |
| S3_BUCKET_NAME="<YOUR_BUCKET_NAME_HERE>" | |
| OLDEST_FILENAME="" | |
| echo "Running..." | |
| while :; do | |
| echo "Finding oldest file..." |