Capistrano

Is awesome.

1. check you've got an up-to-date version of Ruby Gems (i.e. >=1.3.x), e.g.

gem -v

2. install

gem install capistrano

3. create your Capfile

desc “List files on server”

task :ls, :hosts => “myhost.com” do

run “ls”

end

4. and run with:

cap ls

(if you need to set a username, use:

set :user, “your user”

task :ls … etc…

OR just add it into the hostname, e.g.

myuser@myhost.com

)

5. list tasks with

cap -T

(assuming you've got a description for each task)

Capistrano requirements – you must:

– use SSH to connect to your remote machines and

– be reasonably familiar with Ruby

https://github.com/capistrano/capistrano/wiki/2.x-Getting-Started

GitHub:

https://github.com/capistrano/capistrano

And if you're implementing Capistrano for PHP:

http://www.davegardner.me.uk/blog/2012/02/13/php-deployment-with-capistrano/

 

Capistrano

Is awesome. 

1. check you’ve got an up-to-date version of Ruby Gems (i.e. >=1.3.x), e.g.

gem -v

2. install

gem install capistrano

3. create your Capfile

desc “List files on server”

task :ls, :hosts => “myhost.com” do

  run “ls”

end

4. and run with:

cap ls

(if you need to set a username, use:

set :user, “your user”

task :ls … etc…

OR just add it into the hostname, e.g.

myuser@myhost.com

)

5. list tasks with 

cap -T

(assuming you’ve got a description for each task)

Capistrano requirements – you must: 

– use SSH to connect to your remote machines and 

– be reasonably familiar with Ruby

https://github.com/capistrano/capistrano/wiki/2.x-Getting-Started

 

GitHub: 

https://github.com/capistrano/capistrano

and website:

http://capistranorb.com

NSLog format specifiers – a la printf

http://cocoadev.com/wiki/NSLog

Pry – Part 5 – Pry at runtime

Assuming you’ve halted the runtime at the point where you invoked the Pry REPL (see Pry – Part 4), you should have the Pry REPL.

A. The main ways of navigating the stack are the ls and cd commands.

ls shows you methods, constants and variables.

cd moves you into the new context (object or scope).

1. ls

2. cd

B. Apart from navigating state, there are two other commands that are very useful, show-method and show-doc.

1. show-method
This shows the source for a method or class.

2. show-doc shows the documentation by running the method comments through rdoc or yard

Pry – Part 4 – Debugger

You can inject a Pry REPL directly into somewhere that you want to debug.

Here’s an example of runtime invocation:

test.rb

when run using ruby test.rb:

So, code is shown around the REPL invocation line with a cursor showing where the runtime has stopped.

http://pryrepl.org

For the best source of Pry documentation: https://github.com/pry/pry/wiki

For more on Pry at runtime, see Pry – Part 5 – Pry at runtime.

Automatic Post Tagger

Not quite as awesome as an automatic post categoriser but still pretty handy:

http://wordpress.org/extend/plugins/automatic-post-tagger/