Skip to content

Instantly share code, notes, and snippets.

@aviflax
aviflax / List all Tabs in Front Window.scpt
Last active January 4, 2016 18:44
Applescript to List all Tabs in Front Safari Window
tell application "Safari"
set docText to ""
set tabcount to number of tabs in front window
repeat with y from 1 to tabcount
set tabName to name of tab y of front window
set tabURL to URL of tab y of front window
set tabText to tabName & linefeed & tabURL
set docText to docText & tabText & linefeed & linefeed as string
end repeat
@aviflax
aviflax / Feature Request: hide vendored code in PR diffs.md
Created August 25, 2015 15:54
GitHub feature request WRT Go projects using gb to vendor dependencies

My team uses Go. Most of our repos use the vendoring tool Godep to vendor dependencies. The diff view of Pull Requests conveniently collapses those files, that’s very helpful!

We’re now experimenting with a different tool: gb. With gb, all project dependencies are in the root-level folder vendor. It would be great if you guys would auto-collapse these files as well.

Thanks so much!

Avi

PS, Go 1.5, which was recently released, includes an experimental approach to code vendoring which is different from both Godep and gb. You can read about it here:

{
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",
@aviflax
aviflax / lambda.go
Created July 14, 2015 19:49
Proof of concept for using Go with Lambda
// Package lambda helps create workers that run in AWS’ Lambda service.
// The Lambda service is designed to run Node.js programs, so we have a very thin
// Node.js wrapper which is essentially an adapter between our Go worker programs
// and Lambda. Lambda runs our Node.js wrapper/adapter which then in turn runs
// our Go worker programs as child processes, communicating with them via stdio pipes
// and Unix exit codes.
//
// The interaction between the Lambda wrapper and our Go programs works like this:
//
// * The Node.js function is invoked by Lambda. Lambda passes an `event` parameter to
@aviflax
aviflax / resources.md
Last active February 16, 2018 08:12
Resources on the Future of Work and Organizations

Resources on the Future of Work and Organizations

@aviflax
aviflax / 1 - Resources for Learning Stream Data Processing.md
Last active April 21, 2024 21:29
Resources for Learning Stream Data Processing

Introduction

This gist started with a collection of resources I was maintaining on stream data processing — also known as distributed logs, data pipelines, event sourcing, CQRS, and other names.

Over time the set of resources grew quite large and I received some interest in a more guided, opinionated path for learning about stream data processing. So I added the reading list.

Please send me feedback!

@aviflax
aviflax / notes.md
Last active October 3, 2020 22:53
My Notes on “Consumer-Driven Contracts: A Service Evolution Pattern”

My Notes on “Consumer-Driven Contracts: A Service Evolution Pattern”

My notes

  • This article is not exactly cutting-edge — I arrived at similar conclusions years ago
  • Many of the problems are related to XML and XSD and the excessive use of XSD validation that was popular in the SOA community 6–10 years ago
@aviflax
aviflax / IMAP ABNF
Last active February 4, 2020 07:15
; extracted from RFC 3501 and adapted for Instaparse
address = "(" addr-name SP addr-adl SP addr-mailbox SP
addr-host ")"
addr-adl = nstring
; Holds route from [RFC-2822] route-addr if
; non-NIL
addr-host = nstring
@aviflax
aviflax / link_header.py
Created December 5, 2012 18:09 — forked from mnot/link_header.py
link_header.py: HTTP Link header parsing
@aviflax
aviflax / gist:3428919
Created August 22, 2012 20:10
Problem upgrading Node
Running 10.8.0 and latest brew.
$ brew upgrade -v node 2>&1 | pbcopy
==> Upgrading node
==> Downloading http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
Already downloaded: /Library/Caches/Homebrew/node-0.8.7.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/node-0.8.7.tar.gz
==> ./configure --prefix=/usr/local/Cellar/node/0.8.7 --without-npm
./configure --prefix=/usr/local/Cellar/node/0.8.7 --without-npm