phili.pe

Step 3: Adjust your ~/.gitconfig aliases to use the defaultBranch variable, e.g.: [alias] merge_request = push origin HEAD -o merge_request.create -o merge_request.target=master -o merge_request.draft becomes [alias] merge_request...

...git push origin HEAD -o merge_request.create -o merge_request.target="$(git config init.defaultBranch)" -o merge_request.draft Step 3: Adjust your ~/.bashrc aliases to use the defaultBranch variable alias gdm='git diff --color-moved...

makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

...deeper than 1 level: options = params.merge(:include => { :user => :avatar }) Post.paginate options When inspecting the merged params you will get something like this: { :include=> { "user" => :avatar }, :page => 23 } Here the :user...

CONCAT('foo', 'bar', NULL) = NULL the NULL always wins in MySQL. If you would rather treat NULL as...

Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...

Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...

stackoverflow.com

First, decide if you want to pull with rebase. There are some implications of changing this, so think before you...

Master mode (Rails 2) Put the attached file into your spec directory, then merge these lines into your spec_helper.rb: require 'spec/constants_helper' Spec::Runner.configure do |config| # ... config.include ConstantsHelper config.after(:each...

Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']) or a hash (:conditions => { 'state' => 'draft...

ctan.larsko.net

If you plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you...

github.com

When you need to use diff in either some Ruby code or your Rails app, use the differ gem.

There is a nasty bug in all version of Rails 2 and some versions of Rails 3.x where two...

smashingmagazine.com

A comprehensive introduction to sending HTML emails. Intro: HTML email: Two words that, when combined, brings tears to a developer...

...another Pull Request, you will still see them after the "child" PR has been merged. Unfortunately, GitHub won't automatically update the diff (or commit list). Here is what worked...

...you can do the above for your source branch (the one that's being merged into master). Obviously, only the PR of that branch will be updated, but may just...

makandracards.com

Reformatted the checklist into separate “Human checks” and “Agent checks” sections. Modernized the checklist items.

makandra dev
blog.idrsolutions.com

...it: The pdf toolkit pdftk. pdftk can do almost any PDF-related task as merging, splitting, rotating, decrypting, encrypting, filling forms, applying watermarks, reporting metadata and bookmarks, attaching files and...

...COMMIT, but this is not the most recent. If you have neither pushed nor merged it, you can do this: Make a new commit now, with a message like "fix...

This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...

If you added a file by mistake, you can unstage it (but keep local changes) by saying git reset HEAD...

geewax.org

When we started using git to manage our source code at work, we actually jumped in a little bit too...

robots.thoughtbot.com

git command line options for automating common rebasing tasks, like adding a fix to a commit that was already rebased...

github.com

All the hidden and not hidden features of Git and GitHub.

dev.housetrip.com

Introducing Trailer from HouseTrip, a simple menu bar app that helps you manage your GitHub pull requests. It’s one...

github.com

Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites. Note that rcov won't ever have support for Ruby 1.9, you...