Skip to content

Instantly share code, notes, and snippets.

View ToniRib's full-sized avatar

Toni Rib ToniRib

View GitHub Profile
@ToniRib
ToniRib / apollo_space_camp_notes.md
Last active April 29, 2020 18:59
Notes I took during the 2020 Apollo Space Camp

Apollo Space Camp 2020 Notes

Repo: https://github.com/MoonHi-ghway/schema-design-workshop

Intro

  • 5 scalar types: Int, Float, Boolean, String, ID
  • Fields are nullable by default
  • Convention is for enum types to be ALL CAPS
  • Input type: wrapper around a set of fields passed into a mutation
@ToniRib
ToniRib / non_deterministic_specs.md
Created March 11, 2020 15:43
Non-Deterministic Specs

Fixing flaky specs

Need help? Watch this RubyConf video

CircleCI

Each CircleCI container now prints out all of the spec files that it ran along with the seed number. If you see a spec that you think might be failing due to an order dependency, you can run rspec <all spec files listed for that container pasted here> --bisect --seed <seed copied from that container pasted here> locally to get the minimum command to reproduce the failure.

If you run with SSH on CircleCI and need to install VIM on the box to be able to edit specs, follow the 2nd solution on this StackOverflow post to get it installed. You will likely need to use sudo in front of each of the commands.

Some handy git aliases for the command line. The $argv syntax is from fish, but for bash functions you can use $1.

stashlist

Lists the most recent 5 stashes. Shows commit sha/message, who created the stash, and file stats.

git stash list --stat -5 --pretty=format:'%C(yellow)%gd: %C(green)%s %C(blue)[%cn]'
@ToniRib
ToniRib / sumologic_certjam_notes.md
Last active May 10, 2024 21:30
Notes from the 6/11/2019 Sumo Logic Fundamentals Training

Sumologic Training

  • Certification is on home page under certifications (need to be logged in to my own account)

Training Environment

Basics

@ToniRib
ToniRib / party_rabbit.md
Last active March 15, 2018 21:41
A guide on how to party with rabbits

Party Rabbit!

So you've got the party rabbit for the day, huh? It's time to party!

Requirements

  • Requires you to have the ruby gem terminal-notifier installed
  • Requires you to have an environment variable GITHUB_API_TOKEN set in your .bash_profile
    • This is a crontab requirement as it does not have access to all of the environment variables that your normal shell session has.
  • If you are using fish and this is in your config.fish, you MUST copy it into your .bash_profile.
@ToniRib
ToniRib / get_review_requested_pull_requests.md
Last active March 15, 2018 19:24
Checks for PRs with 'review requested' label and pops up a notification

Actions

  • Gets PRs from the main GSC repo (github.com/gospotcheck/gospotcheck) that have a review requested label applied to them
  • If you have at least 1 PR to review, it pops open a Mac notifier message that tells you how many PRs are in the review requested state
  • Allows you to click the notification to go straight to the pull requests page

Usage:

get_review_requested_pull_requests

module Gospotcheck
module Sso
class IdpBroker
def initialize(username, password, request_id)
@username = username
@password = password
@request_id = request_id
end
def sso_user?
@ToniRib
ToniRib / terminal.fish
Created December 30, 2017 23:01
Current terminal prompt & informative git prompt
LOOKS LIKE: 04:01:13PM photo-viewer on master ↑2✓
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
set_color e22265
printf (date "+%I:%M:%S%p ")
set_color normal
@ToniRib
ToniRib / iterm_settings.md
Last active September 12, 2023 12:51
Get natural keybindings in iTerm

Natual Key Bindings for iTerm

Key References

  • command
  • option/alt
  • left arrow
  • right arrow

Steps