This file contains hidden or 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
/***************************************************************** | |
Phant_Ethernet.ino | |
Post data to SparkFun's data stream server system (phant) using | |
an Arduino and an Ethernet Shield. | |
Jim Lindblom @ SparkFun Electronics | |
Original Creation Date: July 3, 2014 | |
This sketch uses an Arduino Uno to POST sensor readings to | |
SparkFun's data logging streams (http://data.sparkfun.com). A post | |
will be initiated whenever pin 3 is connected to ground. |
This file contains hidden or 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
# Bash Prompt Color Variables | |
blu="\[\033[34m\]" | |
cyn="\[\033[36m\]" | |
grn="\[\033[32m\]" | |
yel="\[\033[33m\]" | |
red="\[\033[31m\]" | |
pur="\[\033[35m\]" | |
gry="\[\033[37m\]" | |
end="\[\033[00m\]" |
This file contains hidden or 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
require 'elasticsearch' | |
# defaults to "localhost" | |
client = Elasticsearch::Client.new log: true | |
SCHEDULER.every '5s', :first_in => 0 do |job| | |
health = client.cluster.health | |
send_event('es_health', {value: health['status']}) | |
end |
This file contains hidden or 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
# Git branch in prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
HISTFILESIZE=5000 | |
alias ssh=~/dev/Scripts/ssh-host-color.sh |
This file contains hidden or 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/sh | |
# | |
# ssh into a machine and automatically set the background | |
# color of Mac OS X iTerm depending on the hostname. | |
# | |
# Installation: | |
# 1. Save this script to /your_script_location/ssh-host-color.sh | |
# 2. chmod 755 /your_script_location/ssh-host-color.sh | |
# 3. alias ssh=/your_script_location/ssh-host-color.sh (add this to .bash_profile) | |
# 4. Configure your host colors below. |
This file contains hidden or 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
<!DOCTYPE html> | |
<!-- layout.html --> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div class="container"> | |
<div id='nav'> | |
<a href='{{ url_for('index') }}'><img src="/static/images/monitor-head.png" width='60px' height='31px' alt='monitor-head' id='head-logo' /></a> | |
<ul id='nav-bar'> |
This file contains hidden or 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
# Here's how the controller route and function look: | |
@app.route("/search_items", methods=["POST"]) | |
def search_items(): | |
search_terms = form.search.data | |
results = search(search_terms) # search is a function I've defined in another file and imported | |
return render_template("search_results.html", search_res=results) |
NewerOlder