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
#!/usr/bin/env python | |
# Author: Justin Lintz | |
# usage: ./focal_length dir | |
# Requiresments: dcraw http://www.cybercom.net/~dcoffin/dcraw/ | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
from operator import itemgetter | |
focals = {} |
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 - bash directory changing functions that maintain a | |
# most-recently used stack. | |
# | |
# Run with -help as an argument to see invocation options, or find the | |
# d_usage function below. | |
# | |
# To use these functions, store this in a file someplace and | |
# then execute | |
# |
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
#ifdef DEBUG | |
#define _DEBUG(fmt, args...) printf("%s:%s:%d: "fmt, __FILE__, __FUNCTION__, __LINE__, args) | |
#else | |
#define _DEBUG(fmt, args...) | |
#endif |
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
function usage() { | |
echo ".$0 --argument=foo --argument-two=bar" | |
exit 1 | |
} | |
while [ "$1" != "" ]; do | |
param=${1%=*} | |
value=${1#*=} | |
case $param in | |
--argument) argument=$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
>>> import boto | |
>>> boto.set_stream_logger('foo') | |
>>> ec2 = boto.connect_ec2(debug=2) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/pymodules/python2.6/boto/__init__.py", line 113, in connect_ec2 | |
return EC2Connection(aws_access_key_id, aws_secret_access_key, **kwargs) | |
File "/usr/lib/pymodules/python2.6/boto/ec2/connection.py", line 79, in __init__ | |
https_connection_factory, path) | |
File "/usr/lib/pymodules/python2.6/boto/connection.py", line 498, in __init__ |
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
{ | |
"report_name" : "util", | |
"report_type" : "standard", | |
"title" : "util", | |
"vertical_label" : "Count", | |
"series" : [ | |
{ "metric": "iostat_sdi_util", "color": "660099", "label": "sdi", "type": "line", "line_width": "2" }, | |
{ "metric": "iostat_sdj_util", "color": "99FF00", "label": "sdj", "type": "line", "line_width": "2" }, | |
{ "metric": "iostat_sdk_util", "color": "FF9900", "label": "sdk", "type": "line", "line_width": "2" }, | |
{ "metric": "iostat_sdl_util", "color": "CC3300", "label": "sdl", "type": "line", "line_width": "2" } |
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
package main | |
import "fmt" | |
func main() { | |
fmt.Printf("happy birthday snakes\n") | |
} |
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
--- ./node_modules/hubot-scripts/src/scripts/pagerduty.coffee 2013-04-12 18:05:20.000000000 -0400 | |
+++ ./custom_scripts/pagerduty.coffee 2013-05-28 14:29:25.000000000 -0400 | |
@@ -40,8 +40,13 @@ | |
if missingEnvironmentForApi(msg) | |
return | |
- emailNote = if msg.message.user.pagerdutyEmail | |
- "You've told me your PagerDuty email is #{msg.message.user.pagerdutyEmail}" | |
+ users = robot.brain.usersForFuzzyName(msg.message.user.name) | |
+ if users.length is 1 |
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
filter { | |
if [type] == "syslog" { | |
grok { | |
match => { "message" => [ "%{SYSLOGPAMSESSION}", "%{CRONLOG}", "%{SYSLOGLINE}" ] } | |
add_field => [ "received_at", "%{@timestamp}" ] | |
add_field => [ "received_from", "%{host}" ] | |
overwrite => [ "message" ] # After we've processed the log we dont need the raw message anymore | |
} | |
grep { |
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
log_format logstash_json '{ "@timestamp": "$time_iso8601", ' | |
'"@version": "1", ' | |
'"remote_addr": "$remote_addr", ' | |
'"body_bytes_sent": "$body_bytes_sent", ' | |
'"request_time": "$request_time", ' | |
'"upstream_addr": "$upstream_addr", ' | |
'"upstream_status": "$upstream_status", ' | |
'"upstream_response_time": "$upstream_response_time", ' | |
'"status": "$status", ' | |
'"uri": "$uri", ' |
OlderNewer