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
====> .gitconfig | |
[alias] | |
lsloglastmonth = log --pretty=format:"%ci\\ %C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset" --decorate --after='last month' --before='today' --no-merges | |
====> .bashrc | |
function _funct_gitlog_last_month | |
{ | |
local lastmonth=`gdate '+%Y-%m-01' --date '1 month ago'` | |
for n in */.git | |
do |
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
===> old code | |
def send_gauge_metric(gauge, time, source, value) | |
uri = URI.parse("https://metrics-api.librato.com/v1/gauges/#{gauge}.json") | |
req = Net::HTTP::Post.new(uri.path) | |
req.basic_auth ApiKeys.librato.username, ApiKeys.librato.password | |
req.set_form_data('measure_time' => time.to_i, | |
'period' => 60, | |
'value' => value, |
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
;;; -*- MODE: LISP-INTERACTION -*- | |
(require 'mmm-mode) | |
(require 'mmm-auto) | |
(require 'saveplace) | |
;;(require 'psvn) | |
;;; THIS IS A SAMPLE .EMACS FILE. | |
;;; | |
;;; The .emacs file, which should reside in your home directory, allows you to | |
;;; customize the behavior of Emacs. In general, changes to your .emacs file | |
;;; will not take effect until the next time you start up Emacs. You can load |
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
## leave running | |
while [ 1 ] ; do curl -v "http://mops-eccrine.herokuapp.com/?campaign=FUABRpingdom&network=pingdom" 2>&1 >/dev/null | awk '/Trying/ { printf $3; } /[<] HTTP\/1.1/ { print $3 " " $4; }'; done | tee -a results.txt | |
## then | |
sort results.txt | uniq -c | grep -v "0 0" | |

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
parse_git_branch () | |
{ | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return; | |
local a=""; | |
lb=${ref#refs/heads/}; | |
local ro=$(git config --get branch.${lb}.remote || echo "origin"); | |
local rb=$(git config --get branch.${lb}.merge); | |
rb=${rb#refs/heads/}; | |
local ab=; | |
if [ "" != "${rb}" ]; then |
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
// -*- c -*- | |
#define MINUTES(x) x * 60L * 1000L | |
#define HOURS(x) x * MINUTES(60L) | |
/* | |
* Pin 10 is the light | |
* Pin 9 is the pump | |
*/ | |
#define PUMP_PIN 9 |
At Wooga, we're very conscious about our work environment and the happiness of everyone working here. So when some Woogas moved to 3rd floor in winter and began to feel tired and complain of headaches, we knew something was not right.
After a bit of research, we came up with the idea that perhaps the air could a little to sticky. So we decided to start measuring the CO2 levels.
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
require 'rubygems' | |
require 'fileutils' | |
#require 'active_record' | |
#require 'sqlite3' | |
#require 'readline' | |
require 'ostruct' | |
#require 'ruby-prof' | |
require 'optparse' | |
require 'hpricot' | |
require 'addressable/uri' |