Skip to content

Instantly share code, notes, and snippets.

@mihigh
mihigh / .bash_profile
Created December 11, 2015 12:36
Iterm2 - ssh change background color when in production
# .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
mihigh / data.sh
Last active October 26, 2015 14:53
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