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
| # ~/.gemrc | |
| --- | |
| :verbose: true | |
| :bulk_threshold: 1000 | |
| install: --no-ri --no-rdoc --env-shebang | |
| :sources: | |
| - http://gemcutter.org | |
| - http://gems.rubyforge.org/ | |
| - http://gems.github.com | |
| :benchmark: false |
| # ruby with readline to prevent headache | |
| sudo apt-get install libreadline-dev | |
| CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p392 # <= change with ruby version | |
| # Source http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/ |
| sudo apt-get install | |
| sudo apt-get upgrade | |
| sudo apt-get install libmysql-ruby libmysqlclient-dev | |
| # PostgreSQL dependecies | |
| sudo apt-get install libpq-dev | |
| sudo apt-get install libssl-dev | |
| sudo apt-get install libssl0.9.8 | |
| sudo apt-get install libreadline-dev |
| # test 1st | |
| sudo rmmod hid_magicmouse | |
| # scroll-speed value from 0 (slow) to 63 (fast). Current setting is 45: | |
| sudo modprobe hid_magicmouse scroll-speed=45 scroll-acceleration=1 | |
| # For permanent settings put to the /etc/modprobe.d/magicmouse.conf this: | |
| # options hid_magicmouse scroll-speed=45 scroll-acceleration=1 |
| post :create, :hotel => {:name => 'California'}, :format => 'js' | |
| => credits 'https://github.com/rspec/rspec-rails/issues/189' |
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#Scoped Invitation System for User Groups with Rails#
Starting out with the following models and associations:
####User
####Organization (User Group)
| <!-- /app/views/admin/users/new_invitiations.html.erb --> | |
| <h2>Send invitation</h2> | |
| <%= form_for @user, :url => send_invitation_admin_users_path do |f| %> | |
| <table style='width: 50%'> | |
| <tr> | |
| <td><%= f.label :first_name %></td> | |
| <td><%= f.text_field :first_name %></td> |
| require 'active_support' | |
| require 'active_support/time' | |
| class WaktuSubuh | |
| attr_accessor :morning_hours | |
| def initialize(options={}) | |
| @morning_hours = options[:morning_hours] || [6,7,8] | |
| end | |
| def morning_zone(hour_in_utc=0) |
| # This MVPS HOSTS file is a free download from: # | |
| # http://winhelp2002.mvps.org/hosts.htm # | |
| # # | |
| # Notes: The Operating System does not read the "#" symbol # | |
| # You can create your own notes, after the # symbol # | |
| # This *must* be the first line: 127.0.0.1 localhost # | |
| # # | |
| #**********************************************************# | |
| # -------------- Updated: December-10-2016 --------------- # | |
| #**********************************************************# |