This file contains 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
# kate: syntax ruby; | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'rubygems' | |
require 'thor' | |
class Gemset < Thor | |
include Thor::Actions |
This file contains 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
# Usage example: rails new demo_blog -m template_umur_demo_blog.rb | |
# 2 points demonstrated | |
# - Templates are powerful. You can create even a working application | |
# - Ruby on Rails is very DRY. Code reads as if it's design | |
# Required gems | |
gem 'therubyracer', :platforms => :ruby, :group=>:assets #Rails need | |
gem 'inherited_resources' | |
gem 'has_scope' |
This file contains 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
# kate: syntax ruby; | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Add those comments to colorize non-rb files automatically. It happens that not all ruby files have the rb extension. |
This file contains 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
#### 1. Mount WD ShareSpace over NFS and cache it. Note the mount options, they are must. | |
#$ sudo apt-get install cachefsd | |
#### 2. Create 2 ext4 files systems | |
## e.g. | |
#$ dd if=/dev/zero of=/mnt/wd/book1.img bs=1 count=0 seek=2045G | |
#$ mkfs.ext4 -Lbook1 /mnt/wd/book1.img | |
#### 3. Merge them and enjoy big normal linux file system | |
#$ nano /etc/fstab |
This file contains 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
# Regularly execute this to have a nice difference backup | |
# No Restore. Backups of different dates will be available as if normal folders. | |
# Just use them normally. | |
# On each backup the list of apt-get installed applications are dumped so that | |
# they can be restored simply. You don't wast space to backup the whole system. | |
echo Getting package selections | |
dpkg --get-selections >/home/packages.txt | |
TGT=/media/Elements-1 #!!!! Define your backup target here !!!! |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
#[ -z "$PS1" ] && return | |
if [[ -n "$PS1" ]] ; then | |
# don't put duplicate lines in the history. See bash(1) for more options | |
export HISTCONTROL=ignoreboth |
This file contains 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
# kate: syntax ruby; | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# IRB improvements: Command history, coloring, more shell like commands cd, pwd, dir, cat | |
# Use powerful shell commands | |
# dir | |
# dir '**/*.rb' | |
# cd 'app' | |
# pwd |
NewerOlder