Skip to content

Instantly share code, notes, and snippets.

@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active October 24, 2025 00:57
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@daipresents
daipresents / example1
Last active May 22, 2021 03:01
Ruby rest-client file upload as multipart
require 'rest-client'
RestClient.get(url, headers={})
RestClient.post(url, payload, headers={})
@sivagao
sivagao / Ruby: RR , flexmock testing doubles.rb
Created November 9, 2012 20:59
test doubles: mock, stub, proxy, spy, and so on . Ruby RR , flexmock
# RR
# RR (Double Ruby) is a test double framework that features a rich selection of double techniques and a terse syntax.
#
#
# one of the goal of RR is to make doubles more scannable.
# accomplished by making the double declartion look as much as the actual method invocation as possible
flexmock(User).should_receive(:find).with('42').and_return(jane) # Flexmock
User.should_receive(:find).with('42').and_return(jane) # Rspec
User.expects(:find).with('42').returns {jane} # Mocha
User.should_receive(:find).with('42') {jane} # Rspec using return value blocks