space, → | next slide |
← | previous slide |
d | debug mode |
## <ret> | go to slide # |
c | table of contents (vi) |
f | toggle footer |
r | reload slides |
z | toggle help (this) |
glob
for source files.Puppet::Type.newtype(:package) do
# ...
def insync?
# ...
end
# ...
end
Puppet::Type.newtype(:package) do
# ...
end
return
in this scope?package { "ruby": ensure => installed }
file { "/etc/sysctl.conf":
ensure => file,
group => "root",
mode => 0644,
owner => "root",
source => "puppet:///sysctl.conf",
}
puppet agent --verbose
puppet agent --verbose --debug --trace
package "ruby" do
action :install
end
cookbook_file "/etc/sysctl.conf" do
group "root"
mode 0644
owner "root"
source "sysctl.conf"
end
require 'chef/resource'
class Chef
class Resource
class Package < Chef::Resource
# ...
end
end
end
make
.task :deploy do
sh "git push production master"
end
file "foo.o" => "foo.c" do |t|
sh "gcc -o foo.o foo.c"
end
ssh
-in-a-for
-loop meets Rake$ cap foo
* executing `foo'
* executing "echo foo >&1"
servers: ["rcrowley.org"]
[root@rcrowley.org] executing command
** [out :: root@rcrowley.org] foo
command finished
* executing "echo foo >&2"
servers: ["rcrowley.org"]
[root@rcrowley.org] executing command
*** [err :: root@rcrowley.org] foo
command finished
$
ssh
-in-a-for
-loop.mc-ping
, mc-find-hosts
, mc-rpc
, and more.PUT
not POST
.coreutils
.File
, Dir
, and FileUtils
Process
Etc
# Devise doesn't manage its own dependencies and the main
# devise.rb is impossibly huge.
require 'active_support/multibyte/chars'
require 'restricted_login_validator'
module ::Devise
ALL = [:database_authenticatable]
mattr_accessor :encryptor
@@encryptor = :sha1
mattr_accessor :pepper
@@pepper = "OH HAI"
mattr_accessor :stretches
@@stretches = 10
def self.friendly_token
::ActiveSupport::SecureRandom.base64(15).tr("+/=", "-_ ").
strip.delete("\n")
end
end
require 'active_support/concern' #
require 'warden' # Must be before devise/models.
require 'devise/models' #
require 'devise/models/database_authenticatable' # Must be before
require 'devise/schema' # devise/orm/active_record.
require 'devise/orm/active_record'
require 'devise/encryptors/base'
require 'devise/encryptors/sha1'
require 'devise/orm/active_record'
foo.rb