Skip to content

Instantly share code, notes, and snippets.

View att14's full-sized avatar
🐢

Andrew Tribone att14

🐢
View GitHub Profile
@katef
katef / plot.awk
Last active November 20, 2024 23:27
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@victoryftw
victoryftw / classifications-api.md
Last active May 4, 2020 17:50
EasyPost Duties and Taxes API Documentation

EasyPost Duties and Taxes API

Classification

A Classification identifies a good to be shipped based on its description.

name type source description
id string easypost unique identifier
description string user description of the classified product
@romainl
romainl / colorscheme-override.md
Last active June 27, 2025 01:23
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active April 28, 2025 22:55 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@olih
olih / jq-cheetsheet.md
Last active August 15, 2025 08:14
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@pypt
pypt / pyyaml-duplicates.py
Created September 9, 2015 22:10
PyYAML: raise exception on duplicate keys on the same document hierarchy level
import yaml
from yaml.constructor import ConstructorError
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
def no_duplicates_constructor(loader, node, deep=False):
@todgru
todgru / restart.md
Last active February 26, 2016 23:47
Use Netcat to restart Puma service in Vagrant from OS X

Problem

We had a heck of a time getting Guard, Shotgun, or Rerun to work with our Nginx/Puma/Grape API in a Vagrant and OS X development environment. inotifywatch was no use. We tried Grape-Reload. I could not get it behave the way I wanted. Maybe this was because we aren't using Rails. Imagine.

Many restart/reload type gems and inotify depend on the OS kernel to let them know a file has changed. If a file is changed from outside of the file system, like OS X and Vagrant "shared" paths, the Vagrant kernel doesn't see the changes.

Solution

Here is the solution we came up with using Netcat.

On the Vagrant box we have Netcat running, l

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active August 3, 2025 05:20
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@mlanett
mlanett / rails http status codes
Last active August 13, 2025 19:32
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing