Skip to content

Instantly share code, notes, and snippets.

View chy168's full-sized avatar
🤠

Hung-Yen chy168

🤠
  • Taiwan
View GitHub Profile
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\{\1\}/'
}
if [ "$WINDOW" == "" ] ; then
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]{\A}\[\e[0m\]\\$ "
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]\$(parse_git_branch)\[\e[0m\]\\$ "
# PS1="\[\e[1;36m\]\u\[\e[31m\]@\[\e[33m\]\H\[\e[35m\][\w]\[\e[34m\]\$(parse_git_branch)\[\e[0m\]\e[\nm\]\e[30;48;5;105m\\$\e[m "
@chy168
chy168 / riemann.js
Last active August 29, 2015 13:59 — forked from sentinelleader/riemann.js
riemann for StatsD backend
/*
*
* To enable this backend, include './backends/riemann' in the backends
* configuration array:
*
* Requires Riemann Node client
*
* backends: ['./backends/riemann']
*
*/
@chy168
chy168 / mule
Last active December 24, 2015 16:19 — forked from rhoegg/mule
Mule init script. puppet can detect status to ensure service status.
#!/bin/bash
# Modify from: https://gist.github.com/rhoegg/5681446
# RHEL Mule Init Script
#
# chkconfig: 2345 65 64
# description: Mule ESB service
. /etc/init.d/functions
#
if [ -f /etc/sysconfig/mule ]; then
@chy168
chy168 / .gitignore
Created November 2, 2011 07:29 — forked from karmi/.gitignore
Donut Chart from ElasticSearch Terms Facet
.DS_Store
tmp/