Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am julianschuh on github.
  • I am julez (https://keybase.io/julez) on keybase.
  • I have a public key whose fingerprint is BD99 81DC 6B11 6B0F 0B03 F7C8 D255 C770 EC15 BB63

To claim this, I am signing this object:

int[] pixelColors = image.getRGB(0, 0, image.getWidth(), image.getHeight(), null, 0, image.getWidth());
long redTotal = 0;
long greenTotal = 0;
long blueTotal = 0;
for (int rgbaColor : pixelColors) {
blueTotal += ((rgbaColor >> 0) & 0xFF);
greenTotal += ((rgbaColor >> 8) & 0xFF);
@julianschuh
julianschuh / gist:973018
Created May 15, 2011 10:05 — forked from sync/gist:957132
Keep your iOS network activity indicator under control, in a *thread-safe* way. Also shows a useful means of debugging it by logging backtraces for on/off calls.
//
// KBNetworkActivityIndicator.h
// Kobov3
//
// Created by Jim Dovey on 10-03-21.
// Copyright 2010 Kobo Inc. All rights reserved.
//
#import <Foundation/Foundation.h>