Skip to content

Instantly share code, notes, and snippets.

@ravron
ravron / lever.user.css
Last active February 26, 2021 18:22
A style to improve Lever's annoyingly narrow candidate page
/* ==UserStyle==
@name Wide Lever candidate view
@namespace github.com/ravron
@version 1.0.3
@description Make Lever's candidate view more space-efficient
@homepageURL https://gist.github.com/ravron/b3f5974c0f7bbab7bcabfa8908e074fc
@updateURL https://gist.github.com/ravron/b3f5974c0f7bbab7bcabfa8908e074fc/raw/lever.user.css
@author ravron
==/UserStyle== */
@-moz-document url-prefix("https://hire.lever.co/candidates/") {
@ravron
ravron / screenshots.md
Created July 2, 2020 19:18
Tips for screenshots on macOS
  • ⇧⌘3: whole-screen screenshot saved to desktop (if multiple monitors, one per monitor)
  • ⌃⇧⌘3: whole-screen screenshot (if multiple monitors, main monitor only)
  • ⇧⌘4: start partial screen selection
    • drag and release: selected area saved to desktop
    • hold ⌃ and drag and release: selected area saved to clipboard
    • tap space bar: toggle one-window selection; use to take perfectly framed captures of one window
    • start dragging, and while still dragging:
      • hold space bar: dragging changes origin, rather than size; use to adjust when you started the capture at the wrong origin
      • hold ⇧: dragging size changes locked to only one dimension
  • hold ⌥: origin moves as size changes, so that size changes don't affect the capture's center; use to capture an area centered on a point
@ravron
ravron / README.md
Last active March 24, 2020 01:41
Useful macOS CLI tools

This is a list of useful CLI tools that either ship with macOS or are easily installed, usually by brew.

Textual

  • jot — print sequential or random data

    Details

    Install: built-in

@ravron
ravron / README.md
Created August 13, 2018 21:43
Useful macOS CLI tools

This is a list of useful CLI tools that either ship with macOS or are easily installed, usually by brew.

Textual

  • jot — print sequential or random data
@ravron
ravron / README.md
Last active March 18, 2024 18:16
Options to prevent accidental Yubikey OTP triggering

Tired of spamming Yubikey one-time password (OTP) codes into Slack? Here are two options to help prevent that. You can do either or both. Both require ykman, the Yubikey CLI configuration manager. Get it with Homebrew:

brew install ykman

If you…

@ravron
ravron / main.m
Created April 8, 2017 07:01
kCGImagePropertyRawDictionary
#import <Foundation/Foundation.h>
#import <ImageIO/ImageIO.h>
CGImageSourceRef createSourceFromPath(NSString *path) {
NSFileManager *f = [[NSFileManager alloc] init];
NSString *inImagePath = [NSString pathWithComponents:@[f.currentDirectoryPath, path]];
CGDataProviderRef provider = CGDataProviderCreateWithFilename([inImagePath cStringUsingEncoding:NSUTF8StringEncoding]);
CGImageSourceRef src = CGImageSourceCreateWithDataProvider(provider, NULL);
CGDataProviderRelease(provider);
return src;