Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: edda7e2086
Fetching contributors…

Cannot retrieve contributors at this time

159 lines (116 sloc) 2.216 kb
snippet cl
class ${1:classname} {
${2:# code}
}
snippet clin
class ${1:classname} inherits ${2:classname} {
${3:# code}
}
snippet def
define ${1:typename}(${2:args}) {
${3:# code}
}
snippet node
node "${1:name}" {
${2:# code}
}
snippet nodein
node "${1:name}" inherits "${2:name}" {
${3:# code}
}
#############################################################################
# CONDITIONALS
snippet if
if $${1:variable} ${2:==} ${3:"value"} {
${4:# code}
}
snippet ifelse
if $${1:variable} ${2:==} ${3:"value"} {
${4:# code}
}
${5:# code}
}
snippet elsif
elsif $${1:variable} {
${2:# code}
}
snippet elsifelse
elsif $${1:variable} {
${2:# code}
} else {
${3:# code}
}
snippet $?
$${1:variable} ? {
${2:value} => ${3:result},
default => ${4:result},
},
snippet case
case $${1:variable} {
${2:value}: {
${3:# code}
}
default: {
${4:# code}
}
}
#############################################################################
# BUILT IN FUNCTIONS
snippet alert
alert("${1:string}")
snippet crit
crit("${1:string}")
snippet debug
debug("${1:string}")
snippet defined
defined(${1:resource})
snippet emerg
emerg("${1:string}")
snippet err
err("${1:string}")
snippet extlookup
extlookup("${1:key}", "${2:default value}")
snippet fail
fail("${1:string}")
snippet file
file("${1:path}")
snippet fqdn
fqdn_rand(${1:range})
snippet generate
generate("${1:command}")
snippet inc
include ${1:classname}
snippet info
info("${1:string}")
snippet inline
inline_template("${1:string}")
snippet md5
md5("${1:string}")
snippet notice
notice("${1:string}")
snippet realize
realize(${1:string})
snippet regsubst
regsubst($${1:target}, /${2:regexp}/, "${3:replacement}")
snippet require
require ${1:classname}
snippet search
search(${1:namespace})
snippet sha1
sha1(${1:string})
snippet quote
shellquote(${1:args})
snippet split
split($${1:string}, "${2:regexp}")
snippet sprintf
sprintf("${1:string}", ${2:args})
snippet tag
tag("${1:string}")
snippet tagged
tagged("${1:string}")
snippet template
template("${1:path}")
snippet versioncmp
versioncmp("${1:a}", "${2:b}")
snippet warn
warning("${1:string}")
Jump to Line
Something went wrong with that request. Please try again.