Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile
@jschoolcraft
jschoolcraft / brew.md
Created September 5, 2022 15:29 — forked from pudquick/brew.md
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@jschoolcraft
jschoolcraft / tabs.rb
Last active April 4, 2022 12:48
Print a markdown formatted list of tabs from all Brave windows
#!/usr/bin/env ruby
# stolen from https://superuser.com/questions/489207/get-the-currently-open-tabs-in-google-chrome-via-the-command-line
window_count = %x(osascript -e 'tell application "Brave Browser" to get number of windows').to_i
exit if window_count == 0
tabs = []
1.upto(window_count).each do |win|
tab_count = %x(osascript -e 'tell application \"Brave Browser\" to get number of tabs in window #{win}').to_i
@jschoolcraft
jschoolcraft / flake-direnv.md
Created March 4, 2022 12:42 — forked from inscapist/flake-direnv.md
Nix Flakes and Direnv on Mac OSX (Catalina)

Development environment with Nix Flakes and Direnv

This document is targeted at those who seek to build reproducible dev environment across machines, OS, and time.

It maybe easier for remote teams to work together and not spending hours each person setting up asdf/pyenv/rbenv, LSP servers, linters, runtime/libs. Nix is probably the closest thing to Docker in terms of development environment.

Flake is used here because it provides hermetic build, with absolutely no reliance on system environment (be it Arch/Catalina/Mojave). Also it freezes dependencies in flake.lock so builds are reproducible.

This gist provides the setup to develop Java/Clojure/Python applications on Nix. But it can be easily adapted to ruby, nodejs, haskell.

@jschoolcraft
jschoolcraft / byebug_commands.md
Created January 22, 2021 18:23 — forked from elrayle/byebug_commands.md
Byebug Cheatsheet - organized by related commands

Byebug Cheatsheet

This cheatsheet includes most of the byebug commands organized by related commands (e.g. breakpoint related commands are together).

To see official help...

Command Aliases Example Comments
help h h list top level of all commands
help cmd h cmd-alias h n list the details of the next command (this works for all commands)
@jschoolcraft
jschoolcraft / keybase.md
Created January 12, 2021 19:57
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jschoolcraft
jschoolcraft / reactRailsTestSetup.md
Created October 9, 2018 21:24 — forked from andrewprogers/reactRailsTestSetup.md
Setting up A new React on Rails app with webpacker and full test suite

React on Rails with Test Suite (Karma, Jasmine, Enzyme, PhantomJS)

The steps included here detail the steps I followed to get a new React on Rails app set up, with a focus on testing JS components with Karma / Jasmine / Enzyme. A lot of this was liberally borrowed / modified from the Launch Academy curriculum, but there are some additional steps involved to get everything working with webpacker:

Unless otherwise specified, run the code in the terminal

Install Rails with Webpacker configured for React:

rails new project-name
cd project-name

Implementing UI Designs in Interface Builder

Speakers: Kevin Cathey, Tony Ricciardi (Interface builder engineers)

tl;dr: IB helps you save time

Presentation Outline

  • IB at design time
  • IB at build time
  • IB at run time

Wil Turner, Brook Callhan: Speakers

##3 Main components/concepts that enable UI Testing:##

  • UITesting
    • Find and interact w/ UI elements
    • Validate UI properties and state
  • UIrecording
    • Updated test reports to include UI testing data
    • UI testing is enabled by XCTest and UI Accesibility

Implementing UI Designs in Interface Builder

Speakers: Kevin Cathey, Tony Ricciardi (Interface builder engineers)

tl;dr: IB helps you save time

Presentation Outline

  • IB at design time
  • IB at build time
  • IB at run time

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control