Skip to content

Instantly share code, notes, and snippets.

View closer's full-sized avatar
🎯
Focusing

closer closer

🎯
Focusing
View GitHub Profile
# ec2-ip
function ec2-ip() {
instances | percol | awk '{ print $1 }'
}
function instances() {
instances=( $(aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].[Tags[?Key==`Name`].Value[],PublicIpAddress]' \
--output text \
--profile `aws-profile | percol`) )
@closer
closer / minimal-logger.coffee
Created September 20, 2011 08:49 — forked from technoweenie/minimal-logger.coffee
Minimal node.js logger
# logger = require('logger').create()
# logger.info("blah")
# => [2011-3-3T20:24:4.810 info (5021)] blah
# logger.debug("boom")
# =>
# logger.level = Logger.levels.debug
# logger.debug(function() { return "booom" })
# => [2011-3-3T20:24:4.810 error (5021)] booom
class Logger
constructor: (options) ->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Tumblr Cascade</title>
<style type="text/css">
* {
font-size:100%;
}