Skip to content

Instantly share code, notes, and snippets.

in the activity group constructor:
/*
* ensure default exception handler is set
*/
if (!(Thread.getDefaultUncaughtExceptionHandler() instanceof FoobarDefaultExceptionHandler)) {
Thread.setDefaultUncaughtExceptionHandler(new FoobarDefaultExceptionHandler(exnLogDir));
}
@stroucki
stroucki / majiang.txt
Last active July 29, 2023 04:44
Short introduction to Majiang
Short introduction to Majiang
There are four copies of every game tile.
Numbered Suits:
萬 - ten thousand
餅 - cakes
條 - sticks (1 of sticks has a picture of a bird)
Numbers
@stroucki
stroucki / stack.go
Created October 14, 2016 21:08
go stack dump
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package debug contains facilities for programs to debug themselves while
// they are running.
package debug
import (
"os"
@stroucki
stroucki / pre-receive
Created October 12, 2016 00:08
Limit size of files pushed to a repository
#!/bin/bash
# Script to limit the size of a push to git repository.
# Git repo has issues with big pushes, and we shouldn't have a real need for those
#
# eis/02.02.2012
# adapted by stroucki 20161011 to guard against large files the user has deleted, but are part of history
# --- Safety check, should not be run from command line
if [ -z "$GIT_DIR" ]; then