
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
## 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 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
;;; -*- 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 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
===> 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 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
====> .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 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
// -*- c -*- | |
#define TO_INT(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) \ | |
(256*arg1) + (128*arg2) + (64*arg3) + (32*arg4) + (16*arg5) + \ | |
( 8*arg6) + ( 4*arg7) + ( 2*arg8) + ( 1*arg9) | |
const int lookup[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256 }; | |
const int SwitchPin = 13; | |
const int SwitchPin2 = 12; |
Scenario:
Private repo which references a private gem can't be built because the gem can't be checked out. The gem in question is installed via bundler and a Gemfile.
Question:
I saw in the output of the test that TravisCI creates a id_rsa key:
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
#!/usr/bin/ruby | |
# | |
# Author: Gerrit Riessen, [email protected] | |
# Copyright (C) 2009 Gerrit Riessen | |
# This code is licensed under the GNU Public License. | |
# | |
# $Id$ | |
require 'rubygems' | |
require 'fileutils' |
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 'zendesk_api' | |
# retrieve login details from yml file. | |
z = get_login_details(:zendesk) | |
client = ZendeskAPI::Client.new do |config| | |
config.url = "https://#{z.first}.zendesk.com/api/v2" | |
config.username = z[1] | |
config.password = z.last | |
require 'logger' |