Skip to content

Instantly share code, notes, and snippets.

@gdamjan
gdamjan / client.py
Last active November 10, 2019 20:22
Python 3.5 async/await with aiohttp, parallel or sequential
import aiohttp
import asyncio
async def get_body(url):
response = await aiohttp.request('GET', url)
raw_html = await response.read()
return raw_html
async def main():
# run them sequentially (but the loop can do other stuff in the meanwhile)
@jtyberg
jtyberg / vpn_fix.sh
Last active February 17, 2020 03:25 — forked from christian-blades-cb/vpn_fix.sh
fix network routing issues caused by Cisco AnyConnect with VirtualBox and boot2docker on Mac OS X
#!/usr/bin/env bash
# Fix network routing issues caused by Cisco AnyConnect VPN when using
# VirtualBox and boot2docker on Mac OS X.
#
# Environment:
# Mac OS X 10.9.5
# VirtualBox 4.3.20
# Cisco AnyConnect 3.1.04074
# boot2docker v1.4.1 (Git commit: 43241cb)