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:
#!/bin/bash | |
echo "Starting..." | |
param=`sed -e 1$'{w/dev/stdout\n;d}' -i~ params.out` | |
while [[ -n $param ]]; do | |
echo "Starting process for $param..." | |
<some-command> $param & | |
curr_pid=`echo $!` |
#!/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/ |
/** | |
* Prints: | |
* creating A | |
* creating B | |
* in B print | |
*/ | |
public class Main { | |
public abstract class A { | |
public A() { |
########################################################## | |
### 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> |
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: |
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.util.Queue; | |
import java.util.LinkedList; | |
public class QuickSort { | |
private int[] arr; | |
private Queue<int[]> queue; | |
public QuickSort(int[] arr) { | |
super(); |
I hereby claim:
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(); | |
} | |