Skip to content

Instantly share code, notes, and snippets.

View vegarsti's full-sized avatar

Vegard Stikbakke vegarsti

View GitHub Profile
def pairwise(it):
iterator = iter(it)
try:
i = next(iterator)
except StopIteration:
return
yield
try:
j = next(iterator)
except StopIteration:
def pairwise(iterable, n):
iterator = iter(iterable)
items = [None]*n
for i in range(n):
try:
items[i] = next(iterator)
except StopIteration:
return
yield tuple(items)
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/vegard/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="sobole"
Install Karabiner Elements.
Follow this
https://github.com/tekezo/Karabiner-Elements/issues/638
https://twitter.com/thorstenball/status/1576619567488475137?s=20&t=KaBdUrc5-M1bnNTMU6tuQA
Working with Unix Processes
Working with TCP Sockets
Working with Ruby Threads
Zed Shaw's C book
Programming From The Ground Up
Destroy All Software
PeepCode Play by Play
Pragmatic Programmer