Last updated: 12/31/2013
- Edit
/etc/default/localeas sudo. - Append
LC_ALL="en_US.UTF-8"at the end of the file, save and quit. sudo locale-gen en_US en_US.UTF-8sudo dpkg-reconfigure locales
| # run with: god -c /path/to/config.god [add -D if you want to not-deamonize god] | |
| # This is the actual config file used to keep the delayed_job running | |
| APPLICATION_ROOT = "/var/www/application" | |
| RAILS_ENV = "production" | |
| God.watch do |w| | |
| w.name = "delayed_job_production" | |
| w.interval = 15.seconds | |
| w.start = "/bin/bash -c 'cd #{APPLICATION_ROOT}/current; /usr/bin/env RAILS_ENV=#{RAILS_ENV} #{APPLICATION_ROOT}/current/script/delayed_job start > /tmp/delay_job.out'" |
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
Last updated: 12/31/2013
/etc/default/locale as sudo.LC_ALL="en_US.UTF-8" at the end of the file, save and quit.sudo locale-gen en_US en_US.UTF-8sudo dpkg-reconfigure locales| #!/usr/bin/env ruby | |
| # Mails a file using GMail's SMTP Server. | |
| # For illustrative purposes; error checking and testing intentionally omitted for brevity. | |
| # | |
| # Requirements: | |
| # 1) the 'mail' gem must be installed | |
| # 2) a file named 'pw.txt' containing the Google password must be present | |
| # in the current directory. | |
| # | |
| # Ruby versions: tested on 1.9.3, 1.8.7, JRuby |
| # for more info: https://gist.github.com/1120938 |
| download open ssl for windows: http://www.openssl.org/source/ | |
| Reference : | |
| http://www.neilstuff.com/apache/apache2-ssl-windows.htm (for installation) | |
| http://www.napcsweb.com/howto/rails/deployment/RailsWithApacheAndMongrel.pdf (for httpd.conf and ssl.conf & proxy fix) | |
| Sample openssl confi (required to create key file) |
| require 'rubygems' | |
| require 'memcache' | |
| class Memcaching | |
| def initialize | |
| @cache = MemCache.new 'localhost:11211', :namespace => 'goofingaroundwithmemcached' | |
| end | |
| def load_key_into_memcache(key,value) |