Skip to content

Instantly share code, notes, and snippets.

@leesmith
leesmith / simple-git-workflow.md
Last active December 30, 2023 23:37
Simple Git Workflow For Continuous Delivery

Simple Git Workflow For Continuous Delivery

Workflow guidelines:

  • master branch is always production-ready, deployable, 100% green test suite
  • New development is done on feature branches, with frequent rebasing onto master
  • Clean commit history by preferring to rebase instead of merge (git pull is configured to automatically rebase)

rebase workflow

Workflow

@leesmith
leesmith / regex.txt
Created November 19, 2011 03:54
Regex cheatsheet
regex characters:
.
any character except newline
[ ]
any single character of set
[^ ]
any single character NOT of set
*
0 or more previous regular expression
*?
@leesmith
leesmith / deploy.log
Last active November 20, 2021 22:58
Heroku Rails 6 issue
git push heroku tailwind:master
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 395 bytes | 395.00 KiB/s, done.
Total 5 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
@leesmith
leesmith / single-session-development.md
Last active September 5, 2021 03:13
Single Session Development

Single Session Development

Posted March 06, 2013 02:31 By Veezus Kreist (http://blog.veez.us/)

I've always been a pretty austere guy. I'd rather have less things than more: every time I move I throw out half of what I have. I'm not big into customization, either; if there's a non-ridiculous default, that's what I'm using.

That ethos extends into my work. I use the default Terminal.app on my MacBook, with the built-in Pro theme. I use exactly 12 vim plugins, including my favorite color scheme. My dot files amount to only 300-some lines, including vim options, bash options, git options, and comments.

That's the background for this post on single-session development, the way I've been developing lately. When I say session, I mean shell session. I mean, log into one shell on my laptop, maximize it, and run everything in that one session: no tabs, no screen, and certainly no tmux. Bernerd Schaefer started me down this path in his Laptop-Driven Development; that post has been hanging out in the back of my

@leesmith
leesmith / great-work.md
Last active September 5, 2021 03:11
Great Work

What separates the fleeting thrill of a “great idea” from the enduring rewards of great work?

These five facts:

  1. Great work is work that helps people. It’s not made great by accolades or praise from your peers… but by the experience of the people who actually use it. That’s work you can be proud of.
  2. Great work can be done by anyone. You don’t need to be “An Expert.” If you take the time to find out what people truly need, your work can help people now, and so you can do great work now.
  3. Great work is shipped work. Work that lives only in your brain or your hard drive can’t be great work. If you want your work to help people, you’ve got to get it into their hot little hands.
  4. Great work is work you can keep doing. If your work can’t sustain itself (aka with money and time off), you can’t keep doing it, which means you can’t keep helping people, and neither can your work. Great work takes care of you, so you can take care of it.
  5. Great work is never done. There can be nothing pe
@leesmith
leesmith / team-workflow.md
Created August 29, 2012 16:18
Git workflow for agile teams

Mar 2nd, 2009

An efficient workflow for developers in Agile teams that handles features and bugs while keeping a clean and sane history.

At Hashrocket we use git both internally and in our Agile mentoring and training. Git gives us the flexibility to design a version control workflow that meets the needs of either a fully Agile team or a team

@leesmith
leesmith / api_controller.rb
Created August 14, 2020 20:08 — forked from eliotsykes/api_controller.rb
Token Authentication in Rails API Controller and Request Spec
# File: app/controllers/api/api_controller.rb
class Api::ApiController < ActionController::Base
# Consider subclassing ActionController::API instead of Base, see
# http://api.rubyonrails.org/classes/ActionController/API.html
protect_from_forgery with: :null_session
before_action :authenticate
def self.disable_turbolinks_cookies
skip_before_action :set_request_method_cookie
@leesmith
leesmith / bootable-usb.md
Last active July 9, 2020 05:13
Create a bootable macOS USB drive

Create A Bootable macOS USB Drive

http://support.apple.com/kb/HT5856?viewlocale=en_US&locale=en_US

  1. Download the macOS installer from the Mac App Store and make sure it's in your main Applications folder.

  2. Connect a properly formatted 8GB (or larger) drive. Rename the drive to Untitled. (The command in the next step assumes the drive is named Untitled.)

  3. Run command in terminal:

@leesmith
leesmith / setup.md
Created May 16, 2012 00:27
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

@leesmith
leesmith / commit-message-syntax.txt
Created December 31, 2011 06:05
Pivotal Tracker post-commit message syntax
https://www.pivotaltracker.com/help/api?version=v3#github_hooks
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax
SCM Post-Commit Message Syntax
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321:
[#12345677 #12345678] Diverting power from warp drive to torpedoes.