(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.
# Create and enable a swap file | |
have_file_swap = false | |
File.open('/etc/fstab',"r") do |fstab| | |
fstab.each do |line| | |
# Tokenize each fstab line with a space separator | |
tokens = line.split | |
if tokens[2] == "swap" && tokens[0] !~ /\/dev/ | |
have_file_swap = true |
# Enable noatime on local ext3/4 & xfs filesystems | |
fstab = File.open('/etc/fstab',"r") | |
newlines = Array.new | |
needremount = Array.new | |
ihaveswap = false | |
fstab.each do |line| | |
# Tokenize each fstab line with a space separator | |
tokens = line.split | |
if tokens[2] == "swap" |
# Enable noatime on local ext3/4 & xfs filesystems | |
fstab = File.open('/etc/fstab',"r") | |
newlines = Array.new | |
needremount = Array.new | |
ihaveswap = false | |
fstab.each do |line| | |
# Tokenize each fstab line with a space separator | |
tokens = line.split | |
if tokens[2] == "swap" |
# 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.
#!/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. |
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".
(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo