This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
{ | |
"comment_status" = open; | |
"custom_fields" = ( | |
); | |
guid = "http://www.ziggear.us/?p=1"; | |
link = "http://www.ziggear.us/?p=1"; | |
"menu_order" = 0; | |
"ping_status" = open; | |
"post_author" = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//LuaJIT on iOS 5.1 | |
Lua SciMark 2010-12-10 based on SciMark 2.0a. Copyright (C) 2006-2010 Mike Pall. | |
FFT 4.76 [1024] | |
SOR 12.18 [100] | |
MC 2.94 | |
SPARSE 7.84 [1000, 5000] | |
LU 10.60 [100] | |
SciMark 7.67 [small problem sizes] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary *dict = ... | |
... | |
for (NSString *key in dict) { | |
NSString *value = [dict objectForKey:key]; | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plutil -p xml1 Info.plist | grep "BundleName" | sed 's/ "\(.*\)" => "\(.*\)"/\2/' | |
plutil -p xml1 Info.plist | grep "BundleShortVersionString" | sed 's/ "\(.*\)" => "\(.*\)"/\2/' | |
plutil -p xml1 Info.plist | grep "BundleDisplayName" | sed 's/ "\(.*\)" => "\(.*\)"/\2/' | |
plutil -p xml1 Info.plist | grep "BundleIdentifier" | sed 's/ "\(.*\)" => "\(.*\)"/\2/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by ziggear on 13-5-26 | |
// fw & courtesy: http://cocoasamurai.blogspot.com/2011/04/singletons-your-doing-them-wrong.html | |
// usage: | |
// @implementation SomeClass | |
// .... | |
// kSingletonSynthesize(SomeClass) | |
// @end | |
//Thread-safe block | |
#define kRunInSecurutyBlock(lines) static dispatch_once_t pred; dispatch_once(&pred, ^{ \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#fw:http://www.macworld.com/article/1157370/applescriptsystempreferences.html | |
#AppleScript | |
#Filename: ToggleSharing.scpt | |
tell application "System Preferences" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "System Preferences" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#fw:http://www.techiecorner.com/35/how-to-flush-dns-cache-in-linux-windows-mac/ | |
#windows | |
ipconfig /flushdns | |
#linux | |
/etc/rc.d/init.d/nscd restart | |
#Mac OS X Leopard | |
lookupd -flushcache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#:faster one | |
8.8.8.8 | |
8.8.4.4 | |
#V2EX | |
#:boost appstore speed | |
199.91.73.222 | |
178.79.131.110 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#(1)引导后按tab, 在后面追加数字3 . | |
#(2)root登录执行命令 | |
/usr/sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-osimg-min | |
#(3) 修改默认启动到文本界面 | |
cd /etc/systemd/system | |
ln -s /lib/systemd/system/multi-user.target default.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewCell *oneCell = [tableView cellForRowAtIndexPath: indexPath]; | |
if (oneCell.accessoryType == UITableViewCellAccessoryNone) { | |
oneCell.accessoryType = UITableViewCellAccessoryCheckmark; | |
} else | |
oneCell.accessoryType = UITableViewCellAccessoryNone; | |
[tableView deselectRowAtIndexPath:indexPath animated:YES]; | |
} |