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
Author: Yungho Yi 이영호 | |
Date: 2. 19. 2016 | |
Description: | |
To run a shell script with various commands for Jenkins, I implemented a small shell script function to parse parameters | |
Possible Parameter Inputs: | |
-a 1 3 2 4 -b 1 3 2 1 -> (-a 1 3 2 4) (-b 1 3 2 1) | |
132 1 -a 3 -> (-a 3) | |
-a 3-2 -> (-a 3-2) | |
-a -2 -> (-a) |
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
symlink on host directory in virtualbox | |
https://www.virtualbox.org/ticket/10085#comment:27 | |
http://stackoverflow.com/questions/29831501/docker-not-reporting-memory-usage-correctly | |
https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
sudo apt-get install linux-generic-lts-vivid |
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
scripted field examples | |
_source.duration.value == 0 ? -1 : (_source.duration.value/60000) | |
doc['duration'].value && (doc['duration'].value/60000) | |
doc['duration'].value == 0 ? -1 : (doc['duration'].value/60000) | |
doc['duration'] && (doc['duration'].value/60000) | |
doc['duration'].value == null ? -1 : (doc['duration'].value/60000) | |
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#modules-scripting | |
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html |
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
// new_task.js | |
#!/usr/bin/env node | |
var amqp = require('amqplib/callback_api'); | |
amqp.connect('amqp://localhost', function(err, conn) { | |
conn.createChannel(function(err, ch) { | |
var q = 'task_queue'; | |
var msg = process.argv.slice(2).join(' ') || "Hello World!"; |
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
// emit_log_direct.js | |
#!/usr/bin/env node | |
var amqp = require('amqplib/callback_api'); | |
amqp.connect('amqp://localhost', function(err, conn) { | |
conn.createChannel(function(err, ch) { | |
var ex = 'direct_logs'; | |
var args = process.argv.slice(2); | |
var msg = args.slice(1).join(' ') || 'Hello World!'; |
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
docker images | awk '{print $1} {print $2}' | paste -d':' - - | |
docker images | grep -v latest |
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
SOURCEDIR=utils | |
TARGETDIR=util | |
pushd be > /dev/null | |
SERVICES="$(ls -d *-island)" | |
popd > /dev/null | |
for SERVICE in ${SERVICES}; do | |
pushd be/${SERVICE}/src > /dev/null | |
if [ -d SOURCEDIR ]; then |
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
#!/bin/bash | |
SOURCEDIR=utils | |
TARGETDIR=util | |
pushd be > /dev/null | |
SERVICES="$(ls -d *-island)" | |
popd > /dev/null | |
for SERVICE in ${SERVICES}; 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
// Code for checking the behavior of Consul | |
var Promise = require('bluebird'); | |
var Consul = require('consul'); | |
var consul = Consul({host: "localhost", promisify: true}); | |
// Session Create | |
consul.session.create({ | |
name: "test-java-script", | |
ttl: "600s", |
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
alias babel-node='babel-node --presets stage-0' | |
------ RECV ------ | |
// babel-node recv2.js "#" | |
// babel-node recv2.js "kern.*" | |
const amqp = require('amqplib'); | |
const args = process.argv.slice(2); | |
if (args.length == 0) { |
OlderNewer