This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
- Top 1,000 packages with largest number of dependencies
- Top 1,000 packages with highest PageRank score
Variable |
Type |
// | |
// NSDictionary+prettyPrint.m | |
// GarageRemote | |
// | |
// Created by Gustaf Nilklint on 2014-09-15. | |
// Copyright (c) 2014 Gustaf Nilklint. All rights reserved. | |
// | |
#import "NSDictionary+prettyPrint.h" |
#import <Objective-LevelDB/LevelDB.h> | |
#include <mach/mach_time.h> | |
#include <stdint.h> | |
NSString *randomString(NSUInteger length) { | |
NSMutableString *string = [NSMutableString stringWithCapacity:length]; | |
for (int i = 0; i < length; i++) { | |
[string appendFormat:@"%C", (unichar)('a' + arc4random_uniform(25))]; | |
} | |
return string; |
/** | |
Original Code From, Md. Mahmud Ahsan, http://thinkdiff.net/mixed/base-conversion-handle-upto-36-bases/, 2008.02.28 | |
Adapted Objective-C, Furkan Mustafa, 2013.05.28 | |
Description: Alpha Numeric Base Conversion, Handles upto base 36 | |
*/ | |
NSString* reverseString(NSString* original) { | |
const char* chars = [original cStringUsingEncoding:NSASCIIStringEncoding]; | |
int length = strlen(chars); | |
char* new = (char*)malloc(length+1); |
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" |
// | |
// UIView+RoundedOverlay.h | |
// | |
// Created by Tom Adriaenssen on 05/04/12. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIViewController (RoundedOverlay) |
require 'etc' | |
require 'fileutils' | |
# Copies the most recent MAX_IMAGES photos/videos from the device image dir. | |
# I use Dropbox to sync my device images to my workstation disk | |
MAX_IMAGES=500 | |
USER_HOME_DIR = Etc::getpwuid.dir | |
DEVICE_IMAGES_DIR="#{USER_HOME_DIR}/Dropbox/Camera Uploads" | |
SIMULATOR_IMAGES_DIR="#{USER_HOME_DIR}/Library/Application Support/iPhone Simulator/5.1/Media/DCIM/100APPLE" |
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
@interface UIImage (fixOrientation) | |
- (UIImage *)fixOrientation; | |
@end |