#Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # create systemd service file for rails 2.3.x startup | |
| [Unit] | |
| Description=rails 2.3.x web server | |
| [Service] | |
| Type=simple | |
| RemainAfterExit=yes | |
| User=username | |
| PIDFile=/home/username/WEBSERVER/tmp/pids/thin.pid | |
| WorkingDirectory=/home/username/WEBSERVER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= semantic_form_for @parent do |a| %> | |
| <%= a.inputs "Family Details" do %> | |
| <%= a.input :name %> | |
| <%= a.input :user %> | |
| <%= a.input :region %> | |
| <% end %> | |
| <%= a.inputs "Children" do %> | |
| <table> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BTW yum has last Redis too, remi repository at least. | |
| $ sudo -i | |
| $ yum list redis | |
| $ redis.x86_64 2.6.13-1.el6.remi remi | |
| But today we want compile redis from source (see http://redis.io/download) | |
| $ yum install make gcc tcl | |
| $ cd /usr/local/src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'bundler' | |
| Bundler.require | |
| require './application' | |
| namespace :assets do | |
| desc 'compile assets' | |
| task :compile => [:compile_js, :compile_css] do | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name trials.dailyemerald.com; | |
| access_log /srv/www/trials.dailyemerald.com/access.log; | |
| gzip on; | |
| location / { | |
| root /srv/www/trials.dailyemerald.com/public_html; | |
| try_files $uri /index.html; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'bundler' | |
| Bundler.require | |
| require './application' | |
| namespace :assets do | |
| desc 'compile assets' | |
| task :compile => [:compile_js, :compile_css] do | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation UITextView (RSExtras) | |
| static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
| /*[s length] is assumed to be 0 or 1. s may be nil. | |
| Totally not a strict check.*/ | |
| if (s == nil || [s length] < 1) | |
| return NO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'haml' | |
| # Do not buffer output | |
| $stdout.sync = true | |
| # Get working dir, fixes issues when rackup is called outside app's dir | |
| root_path = Dir.pwd | |
| use Rack::Static, | |
| :urls => ['/stylesheets', '/images', '/javascripts', '/fonts'], | |
| :root => root_path |