(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
#!/usr/bin/env python | |
""" | |
Self-versioning and argument-hashing cache decorator for deterministic functions. | |
Designed to be extensible and API-compliant with Django and Flask cache backends. | |
For examples and caveats, see the bottom of the file. | |
Ted Kaemming: https://github.com/tkaemming | |
Mike Tigas: https://github.com/mtigas | |
""" |
#!/bin/sh | |
# btsync service | |
# Replace with linux users you want to run BTSync clients for | |
BTSYNC_USERS="mendel" | |
DAEMON=/usr/bin/btsync | |
start() { | |
for btsuser in $BTSYNC_USERS; do | |
HOMEDIR=`getent passwd $btsuser | cut -d: -f6` | |
config=$HOMEDIR/.sync/config.json |
# | |
# Extract files from Bare git-annex repositories without git-annex | |
# Supports version v6 | |
# | |
# See internals: http://git-annex.branchable.com/internals/ | |
# | |
# Modified: added non-bare repos, added tar file (of symlinks) output for use with archivemount | |
# | |
# TODO: improve output | |
# TODO: use cat-files instead of archive |
import pandas as pd | |
def _map_to_pandas(rdds): | |
""" Needs to be here due to pickling issues """ | |
return [pd.DataFrame(list(rdds))] | |
def toPandas(df, n_partitions=None): | |
""" | |
Returns the contents of `df` as a local `pandas.DataFrame` in a speedy fashion. The DataFrame is | |
repartitioned if `n_partitions` is passed. |
#!/bin/bash | |
# Automatically setup routing and DNS for a PiZero connected over a USB-network | |
# NOTE: Before running this script for the first time, you need to run the | |
# following two commands on your Linux PC | |
# sudo sysctl -w net.ipv4.ip_forward=1 | |
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE | |
# (replace eth0 in the second command with your internet-facing network device, | |
# e.g. wlan0 on a laptop) | |
# The Avahi-discovered hostname |
GPIO Zero allows you to create objects representing GPIO devices. As well as running it on a Raspberry Pi, you can also install GPIO Zero on a PC and create objects referencing GPIO pins on a Pi over the network.
To do this, you'll need to do a few things to get set up:
Enable Remote GPIO on the Pi in the Raspberry Pi Configuration Tool.
Run the pigpio daemon on the Pi:
Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.
ssh
, ssh-add
and ssh-keygen
on most computers#!/usr/bin/env bash | |
SESSION_NAME=run | |
AWS_REGION=eu-west-1 | |
POSITIONAL=() | |
while [[ $# -gt 0 ]]; do | |
key="$1" | |
case $key in |