Skip to content

Instantly share code, notes, and snippets.

import asyncio
clients = []
class SimpleChatClientProtocol(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
peername = transport.get_extra_info("peername")
self.username = "{:s}:{:d}".format(*peername)
print("connection_made: {}".format(self.username))
@sneils
sneils / aliases.zsh
Last active November 25, 2021 15:50
zsh
#!/usr/bin/env zsh
alias lx='ls -lhAF --group-directories-first --color'
alias dm="docker-machine"
alias dc="docker-compose"
alias gb="git --no-pager branch"
alias go='docker run --rm -it -w /go/src -v "${PWD}":/go/src -v /tmp/gopkg:/go/pkg golang:1.13 go'
@sneils
sneils / README.md
Last active August 18, 2020 10:06
Convert mysql schema to bigquery schema in bash

how to use this

Just run

./convert.sh path/to/schema.sql

Maybe pipe it through jq to get prettier output:

./convert.sh path/to/schema.sql | jq