Skip to content

Instantly share code, notes, and snippets.

@indynz
indynz / JedisTest.java
Created August 15, 2021 18:37 — forked from FredrikWendt/JedisTest.java
Example usage of Jedis
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 {
@indynz
indynz / pedantically_commented_playbook.yml
Created May 10, 2016 08:17 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ 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.
@indynz
indynz / scaffold_ansible.sh
Created May 10, 2016 08:13 — forked from StalkingKillah/scaffold_ansible.sh
Scaffold Ansible project
#!/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
@indynz
indynz / struct.cfm
Last active December 21, 2015 23:19
Railo Closure to loop over a structure/collection
<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;
@indynz
indynz / chat-frontend.js
Created October 1, 2012 10:01 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(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;