Skip to content

Instantly share code, notes, and snippets.

@raorao
raorao / pr-comment-emojis.md
Last active March 27, 2024 23:21
PR Comment Emojis

Any top-level comment on pull request ought be tagged with one of four emojis:

  • for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.

  • 🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.

  • ⚠️ for a blocking comment that must be addressed before the pull request can merge. The comment's author should leave a Request Changes review, and is responsible for re-reviewing once the pull request author has addressed the issue.

  • 😻 for a comment that compliments the author for their work.

@tylerhunt
tylerhunt / visualize_specs.rb
Last active February 12, 2018 12:42
Visualize the state of an RSpec suite using the cached example status.
require 'rspec/core'
css = %(
<style>
html { font-size: 50%; }
.unknown, .passed, .pending, .failed { display: inline-block; height: 1rem; width: 1rem; }
.unknown { background-color: #999; }
.pending { background-color: #FC0; }
.passed { background-color: #3F3; }
.failed { background-color: #F33; }
@stevenharman
stevenharman / 00_Heroku-Release-Phase-Review-Apps-Rails_README.md
Last active March 11, 2024 04:11
Heroku Release Phase script for managing Rails DB migrations, and playing nice with Review Apps and postdeploy scripts

Heroku Release Phase + Review Apps + Rails

This is a simplified, but fairly thorough, set of scripts and configuration to enable Heroku Release Phase for Rails apps. Further, this particular set up plays nicely with Heroku Review Apps in that the release phase script will:

  1. Fail, loudly, if the DB does not yet exist.
  2. Load the DB schema if the current schema version (as determined by bin/rails db:version) is 0.
  3. Run DB migrations otherwise.

For a "normal" app that usually means it will run the DB migrations.

@vakila
vakila / LilLambda.ipynb
Last active January 27, 2023 05:51
Anjana Vakil, "Mary had a little lambda", OSCON 2018 (https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/67384) & EuroPython 2017 (https://youtu.be/7BsfMMYvGaU)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stevenharman
stevenharman / heroku_deploy.sh
Last active June 8, 2017 01:15
A reasonable, and admittedly naïve, attempt at an automated Rails + CircleCI + Heroku deploy script. 🐉 THERE BE DRAGONS! 🐲
#!/usr/bin/env bash
#
# Usage: bin/heroku_deploy <heroku-app-name> [git-treeish : default=HEAD]
. ./shell_colors
set -euo pipefail
app_name=$1
app_remote=$app_name

Rubyist Does Swift

The most fundamental concepts in Swift that should be presented up front:

  • variables and constants
  • type safety
  • type inference

Helpful:

  • println
  • assert
@iamvery
iamvery / deduce.swift
Last active August 29, 2015 14:16
Extend Swift's Array#reduce behavior to provide reasonable initial values
extension Array {
func deduce (initial: T? = nil, _ combine: (T, T) -> T) -> T? {
if let initial = initial {
return reduce(initial, combine: combine);
}
if count > 1 {
var rest = self[1..<count]
return rest.reduce(first!, combine: combine)
} else {
@iamvery
iamvery / .rspec
Last active August 29, 2015 14:15
app configuration files
--color
-r turnip/rspec
@iamvery
iamvery / things.md
Last active August 29, 2015 14:13
Things done.

I've done things.

I'm not a huge fan of resumes, but alas I do, in fact, do (and have done) things in case you're interested. Find me at http://iamvery.com.

Dynetics 2006-2010

IT Support

  • helped users with day-to-day issues involving their desktop and network
  • deployed new VOIP phones
@iamvery
iamvery / bio.md
Last active August 29, 2015 14:09
Conference abstracts

Bio

I have been programming for about 10 years. 3 of those years I have been writing Ruby. Recently I have developed a deep interest in good software design, appropriate levels of testing, and other programming paradigms.

I am a consultant and (Ruby) instructor at Big Nerd Ranch. I am one of a handful of nerds that who works remotely full-time. I love working remotely, but it is not without its challenges! My wife