Skip to content

Instantly share code, notes, and snippets.

View nathos's full-sized avatar

Nathan Henderson nathos

View GitHub Profile
@chockenberry
chockenberry / ql.sh
Last active March 4, 2024 23:40
QuickLook for macOS shell
#!/bin/sh
# usage:
# ql /tmp/file.jpg
# cat /tmp/file.jpg | ql
# cal -h | ql
if [ -z "$*" ]; then
cat > /tmp/ql.stdin
mime_type=$(file --brief --mime-type /tmp/ql.stdin)
@martinwoodward
martinwoodward / create-org-montage.sh
Last active August 22, 2022 14:12
Very quick ruby script to create a bash script that will create a montage of your org.
# Set OCTOKIT_ACCESS_TOKEN to authenticate with a PAT
# Something like OCTOKIT_ACCESS_TOKEN=<<TOKEN>> bundle exec ruby create-org-montage-script.rb
require "octokit"
Octokit.auto_paginate = true
# Replace <<ORG_NAME>> with your GitHub org
members = Octokit.org_members "<<ORG_NAME>>"
@davidcelis
davidcelis / README.md
Last active May 23, 2023 07:41
Watch for changes in a slow monorepo and update a `git status` cache for your prompt to read from 😬

A git prompt hack for the impatient amongst us

Maybe you have a big ol' monorepo, and git operations are pretty slow in it. For those of us who like to show information about the repository's dirty status in our prompt, that means a slow prompt. Waiting 1s every time you hit the return key can really add up! Instead of just giving up and eschewing the dirty status entirely, why not just cache it in the background have your prompt read from the cache?

Prerequisites

First, install fswatch:

brew install fswatch
@dvf
dvf / change-codec.md
Last active November 14, 2024 08:27
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@JennieOhyoung
JennieOhyoung / Leak_prevention.md
Last active January 5, 2022 22:05
Prevent private data from leaks

There are two sides to this story: one on hand, we should do everything in our power to prevent leaks from happening and on the other, we need to have a mitigation plan to ensure proper take down of all leaked data to minimize impact.

Prevention:

@kawsark
kawsark / Vault-ssh-ca-README.md
Created March 28, 2019 16:12
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.

Prerequisites

  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
  • VAULT_SERVER
@tcbyrd
tcbyrd / SCIM-SAML-Identities.graphql
Last active April 30, 2021 16:42
SCIM and SAML identities for all members in an Organization
# Pass the URL for an Organization into the query
# to get a list of members in a specific Organization.
# Example: { "url": "https://github.com/:organization" }
query getResource($url: URI!) {
resource(url: $url) {
... on Organization {
samlIdentityProvider {
externalIdentities(first:10) {
nodes {
scimIdentity {
@nugget
nugget / gist:102a65441eebc62b0c5a65f2e0f24553
Created December 12, 2017 20:34
macnugget.org Pullet Surprise
What do you expect? This is just an online message board. Nobody here is going
to win the pullet surprise for their posts. Mistakes like spelling "lose" as
"loose" are pardon parcel with people who learn the language through talking
and not through reading.
I could of made that same mistake if I hadn't learned these words by reading
them. Sadly, people who don't read just can't cut the muster. Alot of people
would just assume watch a movie instead of read a book and it shows in there
writing. For all intensive purposes they are exposed to new words strickly by
hearing them and they never learn the proper spelling -- It is simple cause and
@jonico
jonico / dashboard.xml
Created September 20, 2016 15:04
Splunk Dashboard for GitHub Enterprise
<dashboard>
<label>Octodemo performance stats</label>
<row>
<panel>
<chart>
<title>Top fetched repos</title>
<search>
<query>index="octodemo" upload-pack user| top repo</query>
<earliest>@w0</earliest>
<latest>now</latest>
@jdmaturen
jdmaturen / company-ownership.md
Last active July 29, 2023 22:39
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute