Skip to content

Instantly share code, notes, and snippets.

View alex-cellcity's full-sized avatar

Alex Yao Cheng alex-cellcity

  • CellCity Ltd.
  • Singapore
View GitHub Profile
{
"status": true,
"data": {
"articleId": 1,
"articleTitle": "Bla bla",
"author": "Bob",
"imageUrl": "http://www.google.com/thumb.jpg",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut magna ipsum, venenatis quis malesuada sit amet, varius ut urna. Etiam rhoncus, lacus et fermentum congue, neque erat viverra erat, ac mattis tortor nisi et nibh."
},
"tips": [
find . '(' -name '*.h' '-or' -name '*.m' ')' -exec cat {} \; | wc -l
{
"status": true,
"list": [
{
"categoryId": 1,
"categoryName": "Bla bla",
"parentCategoryId": 0,
"imageUrl": "http://www.google.com/logo.jpg",
"subCategorires": [
{
{
"list": [
{"categoryID":"3811","categoryName":"Editor's Beauty Blog"},{"categoryID":"4367","categoryName":"Editor's Fashion Blog"},{"categoryID":"4368","categoryName":"Editor's Gourmet Blog"},{"categoryID":"4369","categoryName":"Editor's Mom & Kids Blog"},{"categoryID":"4993","categoryName":"Editor's Wedding Blog"},{"categoryID":"8891","categoryName":"Editor's Entertainment Blog"},{"categoryID":"8892","categoryName":"Editor's Home & Living Blog"},{"categoryID":"8893","categoryName":"Editor's Auto Blog"},{"categoryID":"8894","categoryName":"Editor's Career Blog"},{"categoryID":"8895","categoryName":"Editor's Finance Blog"},{"categoryID":"8896","categoryName":"Editor's Tech Blog"},{"categoryID":"8897","categoryName":"Editor's Travel Blog"},{"categoryID":"11866","categoryName":"Editor's Health & Fitness Blog"}]}
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
{"list":[{"categoryID":"3811","categoryName":"Editor's Beauty Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_beauty.gif"},{"categoryID":"4367","categoryName":"Editor's Fashion Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_fashion.gif"},{"categoryID":"4368","categoryName":"Editor's Gourmet Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_gourmet.gif"},{"categoryID":"4369","categoryName":"Editor's Mom & Kids Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_mom.gif"},{"categoryID":"4993","categoryName":"Editor's Wedding Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_wedding.gif"},{"categoryID":"8891","categoryName":"Editor's Entertainment Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_entertainment.gif"},{"categoryID":"8892","categoryName":"Editor's Home & Living Blog","categoryThumb":"http://nf2.cozycot.com/themes/kuro/img/avatar_home.gif"},{"categoryID":"8893","categoryName":"Editor'
#!/bin/sh
# Change this line to the URI path of the xcode DMG file.
# XCode 3.2.5
#XCODE_PATH="/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg"
# XCode 4
#XCODE_PATH="/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg"
//
// NSData+AESCrypt.h
//
// AES Encrypt/Decrypt
// Created by Jim Dovey and 'Jean'
// See http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html
//
// BASE64 Encoding/Decoding
// Copyright (c) 2001 Kyle Hammond. All rights reserved.
// Original development by Dave Winer.
@alex-cellcity
alex-cellcity / Version.m
Created May 30, 2011 04:55
Runtime iOS Version Checking
/*
* System Versioning Preprocessor Macros
*/
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
@alex-cellcity
alex-cellcity / example.m
Created July 12, 2011 06:27 — forked from henrik/example.m
Locating the keyboard (UIKeyboard) on iOS 4, to e.g. add a custom button.
- (void)someSetupMethod {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification object:nil];
}
- (void)someTeardownMethod {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
}