This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const loggerOn = 0; | |
var winston = null; | |
try { | |
winston = require('winston'); | |
winston.remove(winston.transports.Console); | |
winston.add( | |
winston.transports.File, | |
{ | |
filename: 'match.log', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<script type="text/javascript"> | |
document.write(unescape("%3Cscript src='//munchkin.marketo.net/munchkin.js' type='text/javascript'%3E%3C/script%3E")); | |
</script> | |
<script>Munchkin.init('103-MWY-702');</script> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the_test = 1 | |
Chef::Log.info("The test is #{the_test}") | |
ruby_block "first" do | |
block do | |
Chef::Log.info("(first block) The test is #{the_test}") | |
the_test = 2 | |
end | |
end | |
ruby_block "second" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These resources will essentially run in this order. | |
# You must understand how the converge step in chef works before this will make sense. | |
# Even if you defined these resources in another order, this will still print the | |
# statements in order (FIRST, SECOND, THIRD, ...) | |
# The :before timers always occur before the resource doing the notifying/subscribed to. | |
# The :immediate/:immediately timers always occur after the resource doing the notifying/subscribed to. | |
# When there are notifications and subscriptions with the same timing on a resource | |
# notifications will fire before subscriptions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In Chef, when a resource is defined all its variables are evaluated during | |
# compile time and the execution of the resource takes place in converge phase. | |
# So if the value of a particular attribute is changed in converge | |
# (and not in compile) the resource will be executed with the old value. | |
# Example problem: | |
# Let's consider this situation where there are two steps involved in a recipe | |
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
# in converge phase | |
# Step 2 is a Chef resource that makes use of the node attribute that was |