Skip to content

Instantly share code, notes, and snippets.

View hyunto's full-sized avatar
🎯
Focusing

Jung Hyunsoo hyunto

🎯
Focusing
View GitHub Profile
@hyunto
hyunto / jenkins-slave
Created July 26, 2019 08:26
SysVinit script for jenkins-slave
#!/bin/bash
#
# jenkins-slave Start/Stop the jenkins-slave daemon.
#
# chkconfig: 2345 90 60
# description: Jenkins Slave
### BEGIN INIT INFO
# Provides: crond crontab
# Required-Start: $network
# Required-Stop: $network

Motivation

Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.

Idea

Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.

TL;DR;

#! /bin/sh
### BEGIN INIT INFO
# Provides: docker
# Required-Start: $network $named $remote_fs $syslog iptables
# Required-Stop: $network $named $remote_fs $syslog iptables
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: dockerd
# Description: Manage docker daemon.
### END INIT INFO
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@hyunto
hyunto / .vimrc
Created February 11, 2019 14:38
My .vimrc
" Use the Solarized Dark theme
set background=dark
colorscheme solarized
let g:solarized_termtrans=1
" Make Vim more useful
set nocompatible
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard=unnamed
" Enhance command-line completion
@hyunto
hyunto / API.md
Created September 10, 2018 07:44 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@hyunto
hyunto / backup_rsync.sh
Created January 30, 2018 07:28
backup data using rsync
#!/bin/bash
set -e
DATE="`date +%Y%m%d_%H%M%S`"
TYPE=""
SRC_DIR=""
DEST_DIR=""
BACKUP_DIR=""
@hyunto
hyunto / minio_init_script_for_ubuntu
Last active February 12, 2018 05:44
This is the systemd script that start or stop a minio server.
#! /bin/sh
### BEGIN INIT INFO
# Provides: minio
# Required-Start: $network $named $remote_fs $syslog
# Required-Stop: $network $named $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: minio server
# Description: Minio is an open source object storage server
# with Amazon S3 compatible API.
@hyunto
hyunto / Vagrantfile-spinnaker
Last active December 6, 2017 05:01
Vagrant로 Spinnaker를 설치합니다.
#-*- mode: ruby -*
# vi: set ft=ruby :
# Global Variables
$hostname = 'spinnaker-01'
# Minimum Vagrant Version
Vagrant.require_version '>= 2.0.0'
# Overwrite host locale in ssh session