Skip to content

Instantly share code, notes, and snippets.

mihigh / .bash_profile
Created Dec 11, 2015
Iterm2 - ssh change background color when in production
View .bash_profile
# .bash_profile
# Copy this file on the desired machine.
# This script will change your iterm tab color and the background for that tab.
# Requirements
# - iterm as terminal
# - a profile named Prod in iterm. You can configure it how ever you want. A profile can be found in Preferences -> Profiles
mihigh /
Last active Oct 26, 2015
InfluxDB & Grafana -
# Creating db
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
#Inserting data
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server02 value=0.67'
sleep 1
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server02 value=0.7'
sleep 1
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server02 value=0.40'
sleep 1