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
#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
// 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
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
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
//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
( | |
{ | |
"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
weibo.com##DIV[class="WB_feed_type SW_fun S_line2 type_spe"] | |
weibo.com##DIV[class="WB_feed_type SW_fun W_no_border S_line2"] | |
weibo.com##DIV[class="key S_textb"] | |
weibo.com##DIV[class="W_tips tips_error clearfix"] | |
weibo.com##DIV[class="WB_feed_together S_line1 S_bg1"] | |
weibo.com##DIV[id="pl_rightmod_noticeboard"] | |
weibo.com##DIV[id="trustPagelet_recom_memberv5"] | |
weibo.com##DIV[id="pl_leftnav_app"] | |
weibo.com##DIV[id="trustPagelet_indexright_recom"] |
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
-- select hunman readable time from a unix timestamp | |
select | |
latitude,longitude,datetime(time / 1000, 'unixepoch', 'localtime') as time | |
from UploadedGPSPoints order by -time; |
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
<!-- 让个人首页内容等宽居中 --> | |
<div class="W_main_c" style="left:50%; top:50%; width:auto;"> |