This file contains hidden or 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
| package se.wendt.statoil.mastercard; | |
| import java.util.ArrayList; | |
| import java.util.concurrent.CountDownLatch; | |
| import redis.clients.jedis.Jedis; | |
| import redis.clients.jedis.JedisPubSub; | |
| public class JedisTest { |
This file contains hidden or 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
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| padding () { | |
| local char=" " | |
| if [ "$#" -gt "1" ]; then | |
| local char=${1:-$char} | |
| local count=${2:-"1"} | |
| elif [ "$#" -eq "1" ]; then | |
| local count=${1:-"1"} | |
| fi |
This file contains hidden or 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
| <cfscript> | |
| // this is the collection we want to loop over and add all the keys | |
| numbers = { "num1" : 3, "num2" : 4} | |
| // setup a variable to hold the sum of the value of all the keys | |
| sum = 0 | |
| // closure magic | |
| numbers.each( function(k,v){ | |
| return sum+= v; |
This file contains hidden or 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
| $(function () { | |
| "use strict"; | |
| // for better performance - to avoid searching in DOM | |
| var content = $('#content'); | |
| var input = $('#input'); | |
| var status = $('#status'); | |
| // my color assigned by the server | |
| var myColor = false; |