Skip to content

Instantly share code, notes, and snippets.

BEGIN:VTIMEZONE
TZID:US/Pacific
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZNAME:PDT
END:DAYLIGHT
BEGIN:STANDARD
require 'tzinfo/timezone_definition'
module TZInfo
module Definitions
module America
module New_York
include TimezoneDefinition
timezone 'America/New_York' do |tz|
tz.offset :o0, -17762, 0, :LMT
>> str = "aaaaaaaa"
=> "aaaaaaaa"
>> str.sub('a', 'f')
=> "faaaaaaa"
>> str.gsub('a', 'f')
=> "ffffffff"
>>
~/Projects/onehub/barista (v1) → cat /opt/local/etc/mysql5/my.cnf
[client]
default-character-set = utf8
[server]
max_allowed_packet = 128M
default-character-set = utf8
default-collation = utf8_general_ci
innodb_buffer_pool_size = 256M
~/Projects/onehub/barista (v1) →
file { "/etc/nginx":
source => "puppet:///nginx/webserver",
recurse => true,
owner => "root",
group => "root",
mode => "0644",
replace => true,
purge => true
}
service { nginx:
enable => true,
ensure => "running",
hasstatus => true,
hasrestart => true,
restart => "/etc/init.d/nginx reload",
require => File["/etc/nginx"],
subscribe => File["/etc/nginx"]
}