Skip to content

Instantly share code, notes, and snippets.

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
{
"Key Mappings": {
"0x2a-0x200000": {
"Action": 12,
"Text": "*"
},
"0x2b-0x200000": {
"Action": 12,
"Text": "+"
},

Greasing the Skids: Building Remote Teams

In the wake of the virus that-must-not-be-named (which most people misname anyway), it seems like everyone and their cat has posted some sort of opinion or how-to on making remote work, work. This is a good thing! Working remotely, particularly full-time, is hard! I've done it for my entire career (aside from an odd 14 month office period in the middle that we shall not speak of), but more relevantly, for the past two years I've been responsible for building, managing, and enabling an entirely remote team, distributed across nine timezones. Remote teams don't just happen by installing Slack and telling everyone to work on their couch: they require a lot of effort to do correctly and efficiently. But, done right, it can be a massive multiplier on your team efficiency and flexibility.

Here's how we do it. I'm going to attempt to structure this post more towards management than engineering, and so I apologize in advance if I assume terminology or knowledge which

@matthiassb
matthiassb / dns-sync.sh
Last active March 20, 2024 12:12
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@ibaca
ibaca / GeoJson.java
Last active June 7, 2018 12:22
GWT JsInterop DTOs inheritance
import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY;
import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME;
import static jsinterop.annotations.JsPackage.GLOBAL;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import javax.annotation.Nullable;
import jsinterop.annotations.JsOverlay;
@paulp
paulp / gsdv.sh
Created January 24, 2018 02:28
Use google's verbatim search and date range restriction simultaneously
#!/usr/bin/env bash
#
# Use google's date range and "verbatim" simultaneously
# Paul Phillips <psp@brb.fyi>
#
NAME="$(basename "$0")"
read -r -d '' USAGE << EOM
usage: $NAME [-s days] [-e days] [search terms]
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@5310
5310 / ._userstyles-fira-code
Last active September 23, 2021 09:39
Fira Code, and sexy ligatures! #theme #userstyle
Userstyles to the monospace fonts on certain sites and the Firefox Devtools, etc., to Fira Code.
I don't write userstyles very often, so these may not be particularly effecient or sensible. But at least they work. Corrections welcome!
Stylish of Firefox (at least) allows importing userstyles from arbitrary urls. It doesn't auto-update though, but mays till be easier than pasting by hand? :shrug: