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
# install on osx with brew | |
brew install ipmitool | |
# list all sensors with values and thresholds | |
ipmitool -H 192.168.0.1 sensor | |
# Set lower thresholds for FAN1 (thresh <id> lower <lnr> <lcr> <lnc>) | |
ipmitool -H 192.168.0.1 sensor thresh FAN1 lower 300 300 300 |
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
call plug#begin('~/.nvim/plugged') | |
Plug 'tomasr/molokai' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-repeat' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'Shougo/neocomplcache.vim' | |
Plug 'scrooloose/syntastic' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'spolu/dwm.vim' | |
Plug 'kien/ctrlp.vim' |
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
// $ go run golang-docker-directly.go && docker run -it --rm golang-docker-directly | |
package main | |
import ( | |
"archive/tar" | |
"bytes" | |
"fmt" | |
"log" | |
"os/exec" | |
) |
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
{ | |
"plans": [ | |
{"time": 156} | |
] | |
} |
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 | |
git tag --contains HEAD | grep -q "v.*" && { | |
echo "HEAD is already tagged release." | |
} || { | |
echo "HEAD is not a tagged release." | |
} |
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
- job: | |
name: 'release-application' | |
defaults: defaults | |
scm: | |
- git: | |
url: 'ssh://jenkins@gerrit:29418/application' | |
refspec: '+refs/tags/*:refs/remotes/origin/tags/*' | |
branches: | |
- 'refs/tags/v*' |
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
FROM debian:wheezy | |
ENV RIAKCS_DOWNLOAD_SHA1=caae1342618958fc9c1bc7e79a8596ca27866b3a | |
ENV RIAKCS_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak-cs/2.0/2.0.0/debian/7/riak-cs_2.0.0-1_amd64.deb | |
RUN buildDeps='curl gdebi-core'; \ | |
set -x \ | |
&& apt-get update \ | |
&& apt-get install -y $buildDeps --no-install-recommends \ | |
&& curl -sSL "$RIAKCS_DOWNLOAD_URL" -o riakcs.deb \ |
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
#!/usr/bin/env python | |
import sys | |
import re | |
import subprocess | |
# Make sure HEAD is not a release | |
gitdescribe = subprocess.check_output('git describe', shell=True) | |
release_pattern = re.compile(r"^(v|)\d+\.\d+\.\d+$") |
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 | |
# https://gist.github.com/danriti/7345074 | |
ROOM_ID=1 | |
MESSAGE="$(hostname): $1" | |
AUTH_TOKEN="secret" | |
curl -H "Content-Type: application/json" \ | |
-X POST \ | |
--silent \ |
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 +xe | |
exec 1> >(logger -s -t $0) 2>&1 | |
# Load RVM into a shell session *as a function* | |
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" | |
num_zombies=$(ps aux | grep defunct | grep -v grep | wc -l) | |
[ ${num_zombies} -eq 0 ] && { |