Skip to content

Instantly share code, notes, and snippets.

@chilicat
chilicat / slack-stormstack-simple-workflow
Created August 25, 2015 20:08
Simple Slack/Stackstorm Workflow
---
name: "workflow_test"
description: "Simple Action Chain workflow"
runner_type: "action-chain"
entry_point: "workflows/workflow_test.yaml"
enabled: true
parameters:
vm_name:
description: "VM Name"
type: string
@chilicat
chilicat / idea_template_npe_Check.java
Created January 4, 2011 21:55
NPE check intellij template
if($1$ == null) {
throw new NullPointerException("$1$");
}
@chilicat
chilicat / module
Created January 14, 2011 18:06
module template for intellij
(function() {
$END$
})();
@chilicat
chilicat / fn1.js
Created January 14, 2011 18:10
Function with one param
,
$1$: function($2$) {
$END$
}
@chilicat
chilicat / fn.js
Created January 14, 2011 18:09
Function template for intellij
,
$1$: function() {
}
get$1$: function() {
return this.$2$;
},
set$1$: function($2$) {
this.$2$ = $2$;
}
@chilicat
chilicat / service-init
Last active December 22, 2015 12:39
A example rhel service init script.
#!/bin/bash
### BEGIN INIT INFO
# Provides: test
# Required-Start: postgresql networking
# Required-Stop: postgresql networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: test
# Description: test
@chilicat
chilicat / simple-command-arguments.sh
Created September 29, 2013 09:14
Simple Bash Shell Option Arguments Commandline Implementation
#!/bin/sh
while true
do
case "$1" in
-n|--name) name=$2; shift 2;;
-d|--debug) debug=1; shift 1;;
--) shift 1; break ;;
*) break ;;
esac
@chilicat
chilicat / ssht
Created October 9, 2013 12:54
Shortcut for ssh without adding host to known hosts and strict host key checking
#!/bin/sh
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"
@chilicat
chilicat / docker
Last active December 26, 2015 08:19
Docker centos/rhel service init script
!/bin/bash
### BEGIN INIT INFO
# INIT INFO
# Provides: docker
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: docker