Skip to content

Instantly share code, notes, and snippets.

View okor's full-sized avatar
🏎️

Jason Ormand okor

🏎️
  • Vox Media
  • Denver, CO
View GitHub Profile
@okor
okor / notes.md
Last active March 19, 2021 21:40
BTT Mini12864 Marlin config

Keybase proof

I hereby claim:

  • I am okor on github.
  • I am okor (https://keybase.io/okor) on keybase.
  • I have a public key ASATbkdyZKFVdgBrrFRDnYUtb4oTiUPS9eCEps8jw0byqAo

To claim this, I am signing this object:

@okor
okor / macos_catalina_setup_notes.md
Last active January 30, 2020 20:27
MacOS Catalina setup notes

Show hidden files by default for all applications (except Finder) that open a file dialog. Helpful for editors like SublimeText which don't show hidden files and the shortcut to show hidden files doesn't seem to work in the context of a file dialog. Note: after running this, restart applications to take effect.

defaults write -g AppleShowAllFiles -bool true
defaults write com.apple.Finder AppleShowAllFiles -bool false

Get rid of that annoying red bubble over the system preferences icon implying there is an update (catalina) ... when it's probably just Apple trolling you to turn on iCloud.

alias disable_red_bubble_for_catalina_update='defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall Dock'
#!/bin/bash
set -e
homebrew=
type -p brew >/dev/null && homebrew=1
try_bash_extension() {
if [ -x src/configure ]; then
src/configure && make -C src || {
echo "Optional bash extension failed to build, but things will still work normally."
@okor
okor / kgcclbo.rb
Created February 18, 2019 15:35
Script to clean up kubernetes pods in undesirable states, like after a kops rolling upgrade.
PODINITIALIZING_TIMEOUT_SECONDS = 60*60 # 1 hour
INIT_TIMEOUT_SECONDS = 10*60 # 10 minutes
def normalize_time(time_string)
unit = time_string.scan(/[[:alpha:]]+/).first # s,m,h,d
time = time_string.split(/[[:alpha:]]/).first.to_i # int
case unit
when 's'
time
when 'm'
@okor
okor / install_alacritty_macos.sh
Last active August 10, 2018 14:40
Compile & Install Alacritty for MacOS
# Install rustup.rs
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/jwilm/alacritty.git
cd alacritty
# Optional: use 'scrollback' branch
git checkout scrollback
rustup override set stable
These are my notes, there are many others: https://gist.github.com/MohamedAlaa/2961058
All of these is after prefix, Ctrl+B default but Ctrl+Q on my setup
Resize a pane:
`Esc + arrow`
New Window:
c
@okor
okor / gist:eff59b8bef13addcabd2
Created March 16, 2016 20:14
Measure impact of using prerender via Webpagetest
// Because we aren't technically making the page render any faster, the page we navigate too isn't reporting
// a decrease in render/speedindex/etc, which makes sense. But how would you measure the affects of prerender?
// If I use this same injection strategy locally, give the prerender target page some lead time (a couple seconds or so)
// then the effect is a nearly instant perceived page load. But it's unclear to me how I can measure that. Halp.
// * These don't work *
// inject the prerender tag, give the target page a 1000ms lead time
// result: http://www.webpagetest.org/result/160316_13_cc82666824bc7c89a88336b60eaed1fa/
@okor
okor / gist:ed0bf4615109a2aedae8
Last active September 19, 2015 16:47
Install imagemagick with webp and jpeg2000 support on OSx Yosemite
wget https://github.com/uclouvain/openjpeg/archive/version.2.0.1.tar.gz
** couldn't find working untar command, double click ftw **
cd openjpeg-version.2.0.1
cmake .
make
sudo make install
sudo make clean
@okor
okor / gist:f4aab1a2268b5b0fa667
Created September 17, 2015 15:35
thumbor plugin build log
~/Projects/voxmedia/thumbor-plugins $ make test
running build_ext
INFO:tornado.access:200 GET /unsafe/test.png (127.0.0.1) 44.99ms
INFO:tornado.access:200 GET /unsafe/test.png (127.0.0.1) 140.66ms
INFO:tornado.access:200 GET /unsafe/test.png (127.0.0.1) 240.48ms
============
Vows Results
============