Skip to content

Instantly share code, notes, and snippets.

View ayn's full-sized avatar
🍉
wfh

Andrew Ng ayn

🍉
wfh
View GitHub Profile
@ayn
ayn / gist:11199260
Created April 23, 2014 00:42
localization strings
/* Tutorial: Give it a little shake to get back to your photo roll. */
"Give it a little shake to get back to your photo roll." = "看完搖一搖,重回照片選單";
/* Tutorial: Why tap photos when you can swipe to select! */
"Why tap photos when you can swipe to select!" = "選照片還用點的?滑選才是王道!";
/* Class = "IBUIButton"; normalTitle = "Why do you need to keep your photos secret anyway?"; ObjectID = "8XM-uM-zGQ"; */
"8XM-uM-zGQ.normalTitle" = "話說,為什麼會有想要隱藏的照片呢?";
### Keybase proof
I hereby claim:
* I am ayn on github.
* I am ayn (https://keybase.io/ayn) on keybase.
* I have a public key whose fingerprint is 46A1 29FF 893A 0381 DC81 1E1E BED8 E882 9BFC 594C
To claim this, I am signing this object:
@ayn
ayn / -
Created October 6, 2014 21:52
brew link openssl

Add CommonCrypto/module.map:

module CommonCrypto [system] {
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonRandom.h"
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonKeyDerivation.h"
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCryptor.h"
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h"
  header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonRandom.h"
@ayn
ayn / gist:11514
Created September 19, 2008 00:47
; BIND data for @
;$origin com.
$ttl 86400
@ soa ns.aynassociates.com. hostmaster.aynassociates.com. (
2008093008 ; serial
1200 ; refresh
120 ; retry
2w ; expire --- 240000
@ayn
ayn / gist:13633
Created September 29, 2008 17:36
Errno::ECONNREFUSED in TagsController#create
Connection refused - connect(2)
RAILS_ROOT: /Users/ayn/work/yingyang
Application Trace | Framework Trace | Full Trace
/opt/local/lib/ruby/1.8/net/http.rb:564:in `initialize'
/opt/local/lib/ruby/1.8/net/http.rb:564:in `open'
/opt/local/lib/ruby/1.8/net/http.rb:564:in `connect'
@ayn
ayn / gist:18440
Created October 21, 2008 21:38
growl crashes for me multiple times a day, what gives?
Process: GrowlHelperApp [158]
Path: /Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp
Identifier: com.Growl.GrowlHelperApp
Version: 1.1.4 (1.1.4)
Code Type: X86 (Native)
Parent Process: launchd [120]
Date/Time: 2008-10-21 14:35:28.028 -0700
OS Version: Mac OS X 10.5.5 (9F2114)
Report Version: 6
Thu Oct 23 10:45:16 2008
panic(cpu 1 caller 0x001A9C5C): Kernel trap at 0x003ef878, type 14=page fault, registers:
CR0: 0x8001003b, CR2: 0x633c473e, CR3: 0x01919000, CR4: 0x00000660
EAX: 0x5369442d, EBX: 0x00000080, ECX: 0x00000000, EDX: 0x00000080
CR2: 0x633c473e, EBP: 0x4ac4bd48, ESI: 0x00000010, EDI: 0x0bd22d80
EFL: 0x00010206, EIP: 0x003ef878, CS: 0x00000008, DS: 0x07340010
Error code: 0x00000002
Backtrace (CPU 1), Frame : Return Address (4 potential args on stack)
0x4ac4bb48 : 0x12b4c9 (0x45aaac 0x4ac4bb7c 0x1335ba 0x0)
<style>
.hiding{display:none;}
</style>
<fb:dialog id="my_dialog" cancel_button=1>
<fb:dialog-title>My Little Dialog</fb:dialog-title>
<fb:dialog-content>
<div id='my_hidden_div' class='hiding'>hidden stuff</div>
<div id='test'><a href='#' onclick="document.getElementById('my_hidden_div').toggleClassName('hiding')">toggle the hidden div!</a></div>
</fb:dialog-content>
$TTL 86400
@ SOA ns.example.com. hostmaster.example.com. (
2008110601 ; serial
1200 ; refresh
120 ; retry
2w ; expire --- 240000
3600 ; minimum --- 86400 normally
)
IN NS ns.example.com.