Skip to content

Instantly share code, notes, and snippets.

View wildjcrt's full-sized avatar
🦀
have a nice day!

Jerry Lee wildjcrt

🦀
have a nice day!
View GitHub Profile
h2. References
* http://www.openldap.org/doc/admin24/slapdconfig.html
* http://wikis.sun.com/display/SunJavaSystem/LDAP+Error+Codes
* http://mac.softpedia.com/get/Developer-Tools/LDAPManager.shtml
* http://erikberg.com/notes/auth.html
* http://www.l-penguin.idv.tw/article/ldap-5.htm
* http://islandlinux.org/howto/installing-secure-ldap-openldap-ssl-ubuntu-using-self-signed-certificate
* http://support.microsoft.com/kb/321051
* http://download.microsoft.com/download/9/5/e/95ef66af-9026-4bb0-a41d-a4f81802d92c/%5BMS-ADSC%5D.pdf
@wildjcrt
wildjcrt / irb3.rb
Created September 26, 2011 02:48 — forked from peterc/irb3.rb
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using RVM)
#
# By Peter Cooper, BSD licensed
#
# Main dependency is term-ansicolor for each impl:
# rvm exec gem install term-ansicolor
@wildjcrt
wildjcrt / gist:1252427
Created September 30, 2011 01:26
Rails 3.1.0 Install list
Successfully installed multi_json-1.0.3
Successfully installed activesupport-3.1.0
Successfully installed builder-3.0.0
Successfully installed i18n-0.6.0
Successfully installed bcrypt-ruby-3.0.1
Successfully installed activemodel-3.1.0
Successfully installed rack-1.3.3
Successfully installed rack-cache-1.0.3
Successfully installed rack-test-0.6.1
Successfully installed rack-mount-0.8.3
‎6996666999999666999999666699666666699
6996669999999969999999966699666666699
6996666999999999999999666699666666699
6996666669999999999996666699666666699
6996666666699999999666666699666666699
6996666666666999966666666699666666699
6996666666666699666666666669999999996
# before
## model
class User
after_create : call_3rd_api
def call_3rd_api
xxx
end
end
2,最好不想見---倉央嘉措
第一最好不相見,如此便可不相戀。
第二最好不相知,如此便可不相思。
第三最好不相伴,如此便可不相欠。
第四最好不相惜,如此便可不相憶。
第五最好不相愛,如此便可不相借。
第六最好不相對,如此便可不相會。
第七最好不相誤,如此便可不相負載。
第八最好不相許,如此便可不相續。
@wildjcrt
wildjcrt / gist:1601405
Created January 12, 2012 16:21 — forked from xdite/gist:1599619
Debian DRBD + MySQL + HeartBeat
@wildjcrt
wildjcrt / workers.rake
Created January 30, 2012 08:58 — forked from karmi/workers.rake
Rake taks to launch multiple Resque workers in development/production with simple management included
# Rake task to launch multiple Resque workers in development/production with simple management included
require 'resque/tasks' # Require Resque tasks
namespace :workers do
# = $ rake workers:start
#
# Launch multiple Resque workers with the Rails environment loaded,
# so they have access to your models, etc.

Proposal for Improving Mass Assignment

For a while, I have felt that the following is the correct way to improve the mass assignment problem without increasing the burden on new users. Now that the problem with the Rails default has been brought up again, it's a good time to revisit it.

Sign Allowed Fields

When creating a form with form_for, include a signed token including all of the fields that were created at form creation time. Only these fields are allowed.

To allow new known fields to be added via JS, we could add:

@wildjcrt
wildjcrt / gist:2007247
Created March 9, 2012 16:02
batch delete Kindle Personal Document js code
javascript:(function(){ var v = new RegExp("PersonalDocuments"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})();