Bash – escape sequences
How to change the title of an xterm provides a good explanation of bash escape sequences.
How to change the title of an xterm provides a good explanation of bash escape sequences.
From Bash parameters and parameter expansions
| Parameter | Purpose |
|---|---|
| 0, 1, 2, … | The positional parameters starting from parameter 0. Parameter 0 refers to the name of the program that started bash, or the name of the shell script if the function is running within a shell script. See the bash man pages for information on other possibilities, such as when bash is started with the -c parameter. A string enclosed in single or double quotes will be passed as a single parameter, and the quotes will be stripped.In the case of double quotes, any shell variables such as $HOME will be expanded before the function is called. You will need to use single or double quotes to pass parameters that contain embedded blanks or other characters that might have special meaning to the shell. |
| * | The positional parameters starting from parameter 1. If the expansion is done within double quotes, then the expansion is a single word with the first character of the IFS special variable separating the parameters, or no intervening space if IFS is null. The default IFS value is a blank, tab, and newline. If IFS is unset, then the separator used is a blank, just as for the default IFS. |
| @ | The positional parameters starting from parameter 1. If the expansion is done within double quotes, then each parameter becomes a single word, so that “$@” is equivalent to “$1″ “$2″ … If your parameters are likely to contain embedded blanks, you will want to use this form. |
| # | The number of parameters, not including parameter 0. |
Note: If you have more than 9 parameters, you cannot use $10 to refer to the tenth one. You must first either process or save the first parameter ($1), then use the shift command to drop parameter 1 and move all remaining parameters down 1, so that $10 becomes $9 and so on. The value of $# will be updated to reflect the remaining number of parameters. In practice, you will most often want to iterate over the parameters to a function or shell script, or a list created by command substitution using a for
statement, so this constraint is seldom a problem.
See Wikipedia entry.
Standard Unix/Linux run levels
| ID | Name | Description |
|---|---|---|
| 0 | Halt | Halt system |
| 1 | Single-User Mode | Does not: configure network interfaces, start daemons, or allow non-root logins |
| 2 | Default Multi-user mode | Does not: configure network interfaces or start daemons |
| 3 | Multi-user mode + network | Starts the system normally |
| 4 | Unused | User defined |
| 5 | X11 | Runlevel 3 + Display manager |
| 6 | Reboot | Reboot Linux |
Installation worked fine except for readline (1)
cd ./source/ext/readline make clean ruby extconf.rb make
Rerun the ruby-enterprise installer
Passenger configuration
LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so PassengerRoot /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6 PassengerRuby /opt/ruby-enterprise-1.8.6-20081215/bin/ruby
Possible Apache Virtual Host configuration
<VirtualHost *:80>
ServerAdmin webmaster@tspludge.tld
DocumentRoot “/Users/tracy/Everything/ActivitiesHelium/passenger_test/public”
ServerName spludge.tld
#ServerAlias www.dummy-host.example.com
#ErrorLog “logs/dummy-host.example.com-error_log”
#CustomLog “logs/dummy-host.example.com-access_log” common
RailsAutoDetect on
<Directory “/Users/tracy/Everything/ActivitiesHelium/passenger_test/public”>
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Nothing works if you don’t grant the appropriate permissions in the VirtualHost DocumentRoot Directory (the ‘Directory” entry in this case allows everything)
Manual
/opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6/doc/Users guide.html
To import a Subversion repository into a (new) Git repository
mkdir the_new_git_repo cd the_new_git_repo git svn init -t tags -b branches -T trunk the_old_repo_svn_url git svn fetch
Grant access to everything locally
grant all on *.* to 'me' [identified by 'password']
Grant access to everything from any host
grant all on *.* to 'me'@'%' [identified by 'password']
Mail.app, Play Nice with IMAP Folders! – a good explanation.