I hereby claim:
- I am acroca on github.
- I am acroca (https://keybase.io/acroca) on keybase.
- I have a public key ASB6dJV-oFIeVxD-nHsC0I47K6k8G4etETRcAHVMxh2cEwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<snippet> | |
<content><![CDATA[ | |
console.log('''===> $1: ''', $1) | |
]]></content> | |
<tabTrigger>ps</tabTrigger> | |
<scope>source.coffee</scope> | |
<description>Prints out a variable</description> | |
</snippet> |
'use strict'; | |
var express = require('express'); | |
var connect = require('connect'); | |
var http = require('http'); | |
var newrelic = require('newrelic'); | |
function allowCrossDomain(req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
next(); |
// It works for v1.1.5. | |
// It's very fragile, so be careful using it with other versions. | |
// | |
// To understand how it works, check this out: https://github.com/angular/angular.js/blob/master/src/ng/httpBackend.js#L26-L31 | |
// | |
// Tried and failed more elegant solutions: | |
// - Interceptors. Couldn't get the request body. | |
// - `transformRequest` for the resource or $http. Couldn't get the body or the URL. | |
app.config(function ($httpBackendProvider) { |
# This script copies the public from the last updated file in your Dropbox public folder. | |
# I use it to add screenshots in pull request description. | |
# | |
# Set DROPBOX_USER_ID with the user_id you get when generating public urls | |
# Replace the path ~/Dropbox/Public with your Dropbox public folder. | |
dropbox_public_url() { | |
last_db_item="`find ~/Dropbox/Public -type f -exec stat -f '%m %N' {} \; | sort -n | tail -1 | cut -f2- -d' ' | awk '{ gsub(/.*Public/, \"\"); print }'`" | |
echo "https://dl.dropbox.com/u/$DROPBOX_USER_ID$last_db_item" | pbcopy | |
} |
#!/bin/bash | |
# Install xmlstarlet: brew install xmlstarlet | |
# Set your PIVOTAL_TOKEN and PIVOTAL_NAME | |
for i in `curl -s -H "X-TrackerToken: $PIVOTAL_TOKEN" -X GET http://www.pivotaltracker.com/services/v3/projects | xml sel -t -v "//projects/project/id"` | |
do | |
(curl -s -H "X-TrackerToken: $PIVOTAL_TOKEN" -X GET http://www.pivotaltracker.com/services/v3/projects/$i/stories?filter=owner%3A$PIVOTAL_NAME%20state%3Astarted | | |
xml sel -t -m "//stories/story" -v id -o " - " -v name -n) & | |
done |
package main | |
import "fmt" | |
type Something interface { | |
DoA() | |
DoB() | |
} | |
type Person struct { |
➜ workspace docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests | |
ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d | |
➜ workspace docker logs -f ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d | |
W0428 09:09:41.479862 1 server.go:249] Could not load kubernetes auth path: stat : no such file or directory. Continuing with defaults. | |
I0428 09:09:41.479989 1 server.go:168] Using root directory: /var/lib/kubelet | |
I0428 09:09:41.480061 1 manager.go:103] cAdvisor running in container: "/docker/ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d" | |
I0428 09:09:41.480266 1 fs.go:87] Filesystem partitions: map[/dev/sda1:{mountpoint:/etc/resolv.conf major:8 minor:1}] | |
I0428 09:09:41.481758 1 machine.go:223] Couldn't collect info from a |
grep '.\{120,\}' -Hn `git ls-files` | awk '{split($0, a, ":"); print "git blame -eL "a[2]","a[2]" "a[1]}' | bash | awk '{split($0, a, "<"); split(a[2], b, ">"); print b[1]}' | sort | uniq -c |