Skip to content

Instantly share code, notes, and snippets.

View niftynei's full-sized avatar
on sabbatical

neil saitug niftynei

on sabbatical
View GitHub Profile
niftynei / brew --config
Created June 5, 2012 16:46
Homebrew Error with Gnu-prolog Install
HEAD: (none)
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.4
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: build 5658
niftynei / mergesort.c
Created August 3, 2012 19:52
Mergesort in C!
#include <stdlib.h>
#include <stdio.h>
int* merge_sort(int* ,int, int);
void merge(int*, int, int, int, int);
int main(void) {
int *return_array_ptr;
niftynei / gist:9865193
Created March 30, 2014 00:11
Java Example using Apache's OLTU OAuth2 library
/// using the Apache Oltu library
public String getAuthUrl() {
OAuthClientRequest request = null;
try {
request = OAuthClientRequest
niftynei / gist:fe9b7395983877f91d4a
Created December 27, 2014 04:02
arch-linux VM bootstrap gist
# Follow instructions!
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mkdir /mnt/home
mount /dev/sda1 /mnt
mount /dev/sda2 /mnt/home
niftynei / Makefile
Created December 27, 2014 04:04
Working Basic Kernel Makefile
obj-m := hello.o
KDIR := /lib/modules/${uname -r}/build
PWD := ${shell pwd}
${MAKE} -C ${KDIR} SUBDIRS=${PWD} modules
niftynei / gist:089591caccf53049bcd6
Created January 8, 2015 19:18
bluetooth connection error
01-08 14:10:25.748 3270-3477/com.example.client E/BluetoothConnection﹕ Exception communicating over bluetooth: bt socket closed, read return: -1 bt socket closed, read return: -1
at java.util.concurrent.Executors$
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
at java.util.concurrent.ScheduledThreadPoolExecutor$
niftynei / gist:999b6a323b5503a9f846
Created March 16, 2015 18:16
Thread dump. AS was frozen, unplugging USB to connected device fixed the issue.
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.65-b04-466.1 mixed mode):
"Attach Listener" daemon prio=9 tid=11bc87800 nid=0x11ed4e000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"JobScheduler FJ pool 0/4" daemon prio=6 tid=11bd05000 nid=0x11ee51000 waiting on condition [11ee50000]
java.lang.Thread.State: TIMED_WAITING (parking)
public static final String LESS_THAN_A_MINUTE = "less than a minute";
public static final String SECONDS = "seconds";
public static final String MINUTES = "minutes";
public static final String HOURS = "hours";
public static final String DAYS = "days";
public static final String WEEKS = "weeks";
public static final String MONTHS = "months";
public static final String YEARS = "years";
public static final String DECADES = "decades";
public static final String CENTURIES = "centuries";

Keybase proof

I hereby claim:

  • I am niftynei on github.
  • I am niftynei ( on keybase.
  • I have a public key whose fingerprint is 2650 32C4 4A7D 47F1 519B 1A4C 1F62 C1C0 E516 DDF5

To claim this, I am signing this object:

niftynei /
Last active August 31, 2015 18:07
package com.electricobjects.client.login;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.os.SystemClock;
import android.text.Html;
import android.text.InputType;
import android.text.Spannable;