(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class @Handlers | |
@handlers = {} | |
@register: (handler, registeredClass) -> | |
throw "No constructor on " + handler unless registeredClass.constructor | |
@handlers[handler] = registeredClass | |
@instantiate: (handlers, element) -> | |
handlers = handlers.replace(/\s/g, '').split(',') | |
element.handlers = [] |
# Use this setup block to configure all options available in SimpleForm. | |
# https://github.com/patricklindsay/simple_form-materialize/blob/master/lib/generators/simple_form/materialize/templates/config/initializers/simple_form_materialize.rb | |
# contribute here: https://github.com/mkhairi/materialize-sass/issues/16 | |
SimpleForm.setup do |config| | |
config.wrappers :default, class: :input, | |
hint_class: :field_with_hint, error_class: :field_with_errors do |b| | |
## Extensions enabled by default | |
# Any of these extensions can be disabled for a | |
# given input by passing: `f.input EXTENSION_NAME => false`. |
#!/bin/sh | |
set -e | |
echo blacklist vga16fb > /etc/modprobe.d/novga16fb.conf; | |
cat >> /etc/default/grub <<"EOF" | |
GRUB_CMDLINE_LINUX_DEFAULT="" | |
GRUB_TERMINAL=console | |
EOF | |
update-initramfs -u | |
update-grub |
# RUR (Relationally Universal Ruby) is a Ruby relational algebra DSL | |
# that compiles to SQL, allowing you to write complex | |
# queries without leaving your favorite language. It is going to be a nice | |
# Ruby-like replacement of SQL in the same manner CoffeeScript is a | |
# Ruby-like replacement of JavaScript. It will use all the features | |
# found in a modern RDBMS (views, temp views, constraints, triggers, functions, | |
# etc) without being tightly coupled to one particular implementation. | |
# | |
# Unlike ActiveRecord, which maps tables to classes, RUR maps relations to | |
# objects. |
o = -> { 'o' } | |
def activate! *args | |
print args.map(&:call) | |
end | |
activate! o,o |
#nginx configuration | |
upstream simple_ci { | |
server unix:///tmp/simple_ci.0.sock; | |
} | |
server { | |
listen 80 default_server; # e.g., listen 192.168.1.1:80; | |
server_name ci.empowerunited.com; # e.g., server_name source.example.com; | |
root /home/ci_user/simple_ci/public; |
sudo add-apt-repository ppa:pitti/postgresql | |
sudo apt-get update | |
sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2 | |
sudo su -l postgres | |
psql -d template1 -p 5433 | |
CREATE EXTENSION IF NOT EXISTS hstore; | |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
service postgresql stop | |
/usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf" |
This is how we test that all translation keys match up between locales.
Stuff that only goes in one locale (such as an admin section) or that can't be translated yet (if you use external translators) can simply go in files that don't match the path "config/locales/??.yml", like "config/locales/wip.fo.yml".