This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Catchable<V, T extends Throwable> { | |
V getValue () throws T; | |
} | |
public class CatchableException<V, T extends Throwable> implements Catchable<V, T> { | |
public CatchableException (T throwable) { | |
this.throwable = throwable; | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pipevi () { | |
xargs -d'\n' bash -c '</dev/tty vim -p "$0" "$@"' | |
} | |
find -name "*.xml" | pipevi | |
grep -rl lib | pipevi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script> | |
<div class="gistLoad" data-id="6335659" id="gist-GistID">Loading ....</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iface tun0 inet manual | |
pre-up adb forward tcp:41927 tcp:41927 | |
openvpn azilink | |
dns-nameservers 192.168.56.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function forever () { while [ TRUE ]; do "$@"; done} | |
function doless () { | |
"$@" 2>&1 | tee /dev/stderr | less —buffers=-1 —chop-long-lines —shift 16 —RAW-CONTROL-CHARS —quit-on-intr +G | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove Lock = Caps_Lock | |
keysym Escape = Caps_Lock | |
keysym Caps_Lock = Tab | |
keysym Tab = Escape | |
add Lock = Caps_Lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rest-client' | |
require 'json' | |
require 'open-uri' | |
require 'xmlsimple' | |
INTERVAL=30 | |
THRESHOLD=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.os.CountDownTimer; | |
import android.widget.Toast; | |
@SuppressLint({ "ViewConstructor", "ShowToast" }) | |
public class ProgressToast { | |
public ProgressToast (Activity context, String text) { | |
this.context = context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static enum SyncState { | |
none, | |
create, | |
read, | |
update, | |
delete, | |
creating, | |
reading, | |
updating, | |
deleting, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static enum Column { | |
_id ("INTEGER PRIMARY KEY"), | |
sync_state ("STRING NOT NULL DEFAULT 'none'"), | |
user_id ("LONG NOT NULL"), | |
... | |
; | |
} |
OlderNewer