Skip to content

Instantly share code, notes, and snippets.


Sean O'Neil SeanPONeil

View GitHub Profile
SeanPONeil / .bash_prompt
Created Sep 13, 2012
Sexy Solarized Bash Prompt, inspired by "Extravagant Zsh Prompt"
View .bash_prompt
# Sexy Solarized Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Customized for the Solarized color scheme by Sean O'Neil
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then TERM=gnome-256color; fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
BASE03=$(tput setaf 234)
BASE02=$(tput setaf 235)
BASE01=$(tput setaf 240)

Keybase proof

I hereby claim:

  • I am seanponeil on github.
  • I am seanponeil ( on keybase.
  • I have a public key ASDDvmJwXIYfULVamNP0aqsGQJCIXwXqn_haFHhrGSqmxgo

To claim this, I am signing this object:

SeanPONeil /
Last active Sep 27, 2017
An extension of the IntentService class that will block an Intent from entering the queue if the same Intent is already in the queue.
package com.atami.mgodroid.util;
import java.util.LinkedList;
import android.content.Intent;
* An extension of the IntentService class that will block
SeanPONeil / PRNGstacktrace.txt
Created Aug 20, 2013
Stacktrace when using Google's SecureRandom PRNG patch ( with Robolectric
View PRNGstacktrace.txt
java.lang.RuntimeException: java.lang.SecurityException: Failed to seed OpenSSL PRNG
at org.robolectric.RobolectricTestRunner$2.evaluate(
at org.junit.runners.ParentRunner.runLeaf(
at org.junit.runners.BlockJUnit4ClassRunner.runChild(
at org.junit.runners.BlockJUnit4ClassRunner.runChild(
at org.junit.runners.ParentRunner$
at org.junit.runners.ParentRunner$1.schedule(
at org.junit.runners.ParentRunner.runChildren(
at org.junit.runners.ParentRunner.access$000(
at org.junit.runners.ParentRunner$2.evaluate(
private static String parseVals(String key, String val, String prefix) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
long ts = System.currentTimeMillis() / 1000;
String[] parts = val.split("\\|");
String u_prefix = parts[0];
String u_b64 = parts[1];
String u_sig = parts[2];
String sig = Util.hmacSign(key, u_prefix + "|" + u_b64);
if (!Util.hmacSign(key, sig).equals(Util.hmacSign(key, u_sig))) {
SeanPONeil /
Created Mar 27, 2013
Sort Method for NodeCommentFragment
public void sort(String type){
SharedPreferences prefs = getActivity().getSharedPreferences(
getActivity().getPackageName(), Context.MODE_PRIVATE);
prefs.edit().putString(SORT, ASC).commit();
} else {
prefs.edit().putString(SORT, DESC).commit();
public void onCreate(Bundle savedInstanceState) {
mIsDualPane = getResources().getBoolean(R.bool.has_two_panes);
nid = getIntent().getIntExtra("nid", 0);
SeanPONeil /
Created Aug 30, 2012
script to highlight adb logcat output for console
Copyright 2009, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
SeanPONeil /
Created Aug 15, 2012
Asynchronous Otto BusProvider that always posts events on the main thread
public class AsyncBus extends Bus {
private final Handler mainThread = new Handler(Looper.getMainLooper());
@Override public void post(final Object event) { Runnable() {
@Override public void run() {;
SeanPONeil / gist:3362100
Created Aug 15, 2012
add a suffix to a date
View gist:3362100
static String getDayOfMonthSuffix(final int n) {
if (n >= 11 && n <= 13) {
return "th";
switch (n % 10) {
case 1: return "st";
case 2: return "nd";
case 3: return "rd";
default: return "th";
You can’t perform that action at this time.