Skip to content

Instantly share code, notes, and snippets.

Ficus Kirkpatrick ficusk

Block or report user

Report or block ficusk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ficusk
ficusk / copypastefail.c
Created Feb 23, 2014
Braces don't prevent copy-paste bugs, kids.
View copypastefail.c
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) {
goto fail;
}
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) {
goto fail;
}
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) {
goto fail;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am ficusk on github.
  • I am ficus (https://keybase.io/ficus) on keybase.
  • I have a public key whose fingerprint is B95D 503A ACA5 7ED7 FD5E 97E1 A494 F676 818C 1D4C

To claim this, I am signing this object:

View LruBitmapCache.java
package your.awesome.app;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
import com.android.volley.toolbox.ImageLoader.ImageCache;
public class LruBitmapCache extends LruCache<String, Bitmap> implements ImageCache {
public LruBitmapCache(int maxSize) {
super(maxSize);
@ficusk
ficusk / GsonRequest.java
Last active Jun 4, 2019
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
View GsonRequest.java
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
View war.c
// -rw-r--r--@ 1 ficus 1876110778 5344 Oct 8 2004 war.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
typedef struct _card card;
#define min(a,b) ((a)<(b)?(a):(b))
You can’t perform that action at this time.