|
|
|
Thursday, 02 September 2010 07:00 |
 | About Create Symbolic Link
This Automator action creates a symbolic link for each of the selected files. A symbolic link is similar to an alias, except that many applications, including the Create Clean Archive action, will see only the file points to rather than the alias itself. |
Read more: |
|
|
Saturday, 19 June 2010 13:28 |
This script is designed to be run from the command-line to update the revision of a gem from the gemspec.
alias:
alias rin="rcscript //job:revision_increment http://rorbuilder.info/r/gem.rsf"
*update: 19-Jun-2010 @ 3:53pm*
Here's a more efficient version of the above code:
File.open(file_path,'r+') do |f|
lines = f.readlines; f.rewind;
lines[2].sub!(/\d*(?='$)/){|x| (x.to_i + 1)}
f.write lines.join
end
 Read more: |
|
Friday, 16 April 2010 13:16 |
In the following example the routes can determine if the URI is an alias, a file, a directory, or is the root path.
#!/usr/bin/ruby
# file: test.rb
require 'sinatra'
get '/' do
"home"
end
get '/:file*.*' do
"file"
end
get '/:alias' do
"alias"
end
get '/:directory/' do
"directory"
end
Tested (http://niko:4567) observed
----------------------- --------
/README alias
/README/ directory
/README/fun.txt file
/fun alias
/ home
/home.txt file
/home.txt/ file
/home/file.txt file
/home/f Sinatra doesn't know this ditty
/home/ directory
/home?edit=1 alias
/home/?edit=1 directory
/home.xml?edit=1 file
Note: Alias in this context means a URI which will be redirected to another URI
Resources:
- Sinatra: README [sinatrarb.com] Read more: |
|
|
|
|
|
|