Skip to content

Instantly share code, notes, and snippets.

View martint's full-sized avatar

Martin Traverso martint

View GitHub Profile
public class X
{
public static void main(String[] args)
throws InterruptedException
{
final Thread t = new Thread(new Runnable() {
@Override
public void run()
{
bash_prompt() {
local status=$(git status 2> /dev/null | grep 'working directory clean')
local dirty=''
if [ -z "$status" ]; then
local dirty='*'
fi
local branch=$(git branch 2> /dev/null | grep -e "\* " | sed "s/^..\(.*\)/\1/")
if [ -z "$branch" ]; then
export PS1="[$(date +%H:%M) \u@\[\033[33m\]\h\[\033[39m\]:\w] "
public class A {
private final int dataSize = (int) (Runtime.getRuntime().maxMemory() * 0.6);
public void f()
{
{
byte[] data = new byte[dataSize];
}
byte[] data2 = new byte[dataSize];