Skip to content

Instantly share code, notes, and snippets.

@hlxwell
hlxwell / sort_xcode_project.sh
Created May 21, 2013 03:48
Sort xcode project files, so could be helpful for the teamwork.
#!/usr/bin/perl -w
# Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@TonnyXu
TonnyXu / kvcDemo.md
Created August 24, 2012 08:56
using KVC on collection objects like NSArray and NSDictionary.

KVCを使えば、このようなコードが自動的に値を計算してくれる。

KVC with special keyPath is really powerful for collection objects like NSArray and NSDictionary and NSSet

AppleのDocを見る

@max, @min, @sum, @avg

Sample 1 : One of the element in the array does not contain height property

@TonnyXu
TonnyXu / CountLines2.sh
Created August 29, 2011 06:42
To Handle spaces in file name.
find . -type f \( -name '*.xib' -or -name "*.h" -or -name "*.m" \) -exec awk '{print NR}' {} +|tail -1
@TonnyXu
TonnyXu / countLines.sh
Created August 29, 2011 06:05
Count lines of source code files
wc -l `find . -type f \( -name "*.h" -or -name "*.m" \)`