#{茶男與藍牌}
Life has to be exciting.
  • Me
  • Online Tools.

Removing a passphrase from an SSL Key

By 茶男 On 10/10/2012 · Leave a Comment

from http://www.mnxsolutions.com/apache/removing-a-passphrase-from-an-ssl-key.html

The typical process for creating an SSL certificate is as follows:

# openssl genrsa -des3 -out www.key 2048

Note: When creating the key, you can avoid entering the initial passphrase altogether using:

# openssl genrsa -out www.key 2048

At this point it is asking for a PASS PHRASE (which I will describe how [...]

Continue Reading →

How To Create a Samba Recycle Bin

By 茶男 On 21/05/2012 · Leave a Comment

from http://ubuntuforums.org/showthread.php?t=155763

ok, first you need to create the /etc/samba/recycle.conf file.

Code: sudo vi /etc/samba/recycle.conf

You must create this from scratch so don’t be frightened by the blank page. Mine looks like this:

Code: ##Recycle Bin Configuration File## name = Recycle Bin mode = KEEP_DIRECTORIES|VERSIONS|TOUCH maxsize = 0 exclude = *.tmp|*.temp|*.o|*.obj|~$*|*.~??|*.log|*.trace excludedir = /tmp|/temp|/cache noversions = [...]

Continue Reading →

Chef: WARN: HTTP Request Returned 401 Unauthorized: Failed to authenticate as mhasan. Synchronize the clock on your host.

By 茶男 On 11/05/2012 · Leave a Comment

ntpdate pool.ntp.org

Continue Reading →

Add script to startup

By 茶男 On 09/05/2012 · Leave a Comment

update-rc.d SCRIPT_NAME defaults

Continue Reading →

Understanding delete

By 茶男 On 04/04/2012 · Leave a Comment

from http://perfectionkills.com/understanding-delete/

A couple of weeks ago, I had a chance to glance through Stoyan Stefanov’s Object-Oriented Javascript. The book had an exceptionally high rating on Amazon (12 reviews with 5 stars), so I was curious to see if it was something worth recommending. I started reading through chapter on functions, and really [...]

Continue Reading →

Rails 3: cache: [GET /] miss

By 茶男 On 07/03/2012 · Leave a Comment

If you get this from your error log, there might be two things you might look into:

1. assets pipeline precompile

2. cache_store is not properly set up for the environment (like staging and production)

Continue Reading →

Rails 3.2 asset pipeline precompile needs a Javascript runtime.

By 茶男 On 07/03/2012 · Leave a Comment

To precompile the asset pipeline, you need a Javascript runtime like node.js

Or you will see the error message when you run

rake assets:precompile Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

Continue Reading →

Global functions can go into the /lib in Rails

By 茶男 On 01/03/2012 · Leave a Comment

Write the code in /lib/global.rb

def hello; “world”; end

Autoload in /config/application.rb

config.autoload_paths += Dir["#{config.root}/lib/**.rb/"]

Continue Reading →

Why Web Browser DNS Caching Can Be A Bad Thing

By 茶男 On 29/02/2012 · Leave a Comment

from http://dyn.com/web-browser-dns-caching-bad-thing/

The whole reason for caching DNS records is to reduce unnecessary DNS queries; many webservers don’t change their IP addresses all that often. Every DNS record that your operating system requests has what is called a “Time to Live” (TTL), which is a number (in seconds) that determines how long a particular 

Continue Reading →

Discover ActiveModel: Dirty Record

By 茶男 On 23/02/2012 · Leave a Comment

How to find out the old value for an attribute in active model? How to find out whether the value has changed?

If you take a look at the module ActiveModel::Dirty, you will know.

Take a look at the following examples:

Reference: http://api.rubyonrails.org/classes/ActiveModel/Dirty.html

Continue Reading →
← Previous Entries
  • Categories

    • .NET
    • ActiveRecord
    • Apache
    • Application Server
    • Browser
    • Cantonese
    • CSS
    • Database
    • English
    • General
    • Git
    • IT
    • Java
    • Javascript
    • Linux
    • Mac
    • MySql
    • PHP
    • PostgreSQL
    • Practical Source Code
    • Reflection
    • Ruby
    • SQL
    • Test
    • UI
    • Web
  • Articles

    • October 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
  • Calendar

    June 2013
    M T W T F S S
    « Oct    
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
  • Meta

    • Log in
    • Entries (RSS)
"No public Twitter messages." — chentianwen

#{茶男與藍牌}

Pages

  • Me
  • Online Tools.

The Latest

  • Removing a passphrase from an SSL Key
    from http://www.mnxsolutions.com/apache/removing-a-passphrase-from-an-ssl-key.html The typical process for creating an SSL certificate is as follows: […]

More

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed.
© 2011 ${茶男與藍牌}
PlatformPro by PageLines