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: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.
def form_authenticity_token
@form_authenticity_token ||= if !session.respond_to?(:session_id)
raise InvalidAuthenticityToken, "Request Forgery Protection requires a valid session. Use #allow_forgery_protection to disable it, or use a valid session."
elsif request_forgery_protection_options[:secret]
authenticity_token_from_session_id
elsif session.respond_to?(:dbman) && session.dbman.respond_to?(:generate_digest)
authenticity_token_from_cookie_session
else
raise InvalidAuthenticityToken, "No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store)."
end
module Flickr
class PhotoSet
def primary_photo
"http://farm#{farm}.static.flickr.com/#{server}/#{primary}_#{secret}_s.jpg"
end
end
end
/[if IE 6]
:javascript
var IE6UPDATE_OPTIONS = {
icons_path: "http://static.ie6update.com/hosted/ie6update/images/",
url: "http://www.getfirefox.com/"
}
= javascript_include_tag "http://static.ie6update.com/hosted/ie6update/ie6update.js"
Process: GrowlHelperApp [2331]
Path: /Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp
Identifier: com.Growl.GrowlHelperApp
Version: 1.1.5b1 (1.1.5b1)
Code Type: X86 (Native)
Parent Process: launchd [180]
Interval Since Last Report: 4130 sec
Crashes Since Last Report: 2
Per-App Interval Since Last Report: 247108 sec