Skip to content

Instantly share code, notes, and snippets.

@coliver
coliver / Gemfile-lock-fix.md
Created March 23, 2020 14:01 — forked from carlflor/Gemfile-lock-fix.md
This fixes the Gemfile.lock conflict when doing git rebase

If both the upstream and your feature branch have made changes to Gemfile, you will likely receive merge conflicts on Gemfile.lock when you rebase your feature branch. Don't try to resolve these manually; you'll probably just screw it up. Instead do this:

    git checkout --ours Gemfile.lock
    bundle
    git add Gemfile.lock
    git rebase --continue

This ensures that you get a correct Gemfile.lock at each step along the way.

@coliver
coliver / global-gitignore.md
Created April 21, 2020 21:23 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@coliver
coliver / gist:0e6e00a94f5b01be623316555f8a25e2
Created April 24, 2020 18:30
git log - merges since whenever
git log --merges --first-parent master \
--pretty=format:"%h %<(10,trunc)%aN %C(white)%<(15)%ar%Creset %C(red bold)%<(15)%D%Creset %s"
Explaining each argument:
--merges: only "merge" commits (more than 1 parent);
--first-parent master: only merges applied to master. This removes the entries where someone merged master into their branches;
--pretty-format: applies the following formatting:
%h: the commit short hash;
%<(10,trunc)%aN: author name, truncated at 10 chars;
%<(15)%ar: the relative commit time, padded to 15 chars;
@coliver
coliver / RHNHSCTiD.md
Last active September 1, 2020 20:48
Rails Headful (Not Headless) Selenium Chrome Tests in Docker

This was tested on a Mac running 10.13.6 High Sierra.

Why? I wanted to be able to stop a system spec mid-run if I was having issues with it.

On the mac host:

Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@coliver
coliver / ubuntu_20.04_ruby_dev_setup.md
Created July 8, 2021 19:21
Ubuntu 20.04 Ruby Development Setup

Ubuntu 20.04 Ruby Development Setup

Install chrome

download chrome .deb file from https://www.google.com/chrome/

sudo dpkg -i /tmp/mozilla_rubydev0/google-chrome-stable_current_amd64.deb

Install chromedriver

@coliver
coliver / rdoc-markup-cheetsheet.md
Last active March 28, 2022 22:52
RDoc::Markup Cheetsheet
@coliver
coliver / YARD Doc Cheatsheet.md
Created March 29, 2022 14:37
YARD Doc Cheatsheet
@coliver
coliver / 5th-ludo.md
Created September 6, 2024 23:34
Ludo's AI generated fifth (5th) edition dungeons and dragons character sheet

Ludo

Medium Monstrosity (Rock Creature), Neutral Good


Armor Class 14 (Natural Armor)
Hit Points 85 (10d10 + 30)
Speed 30 ft.


@coliver
coliver / ludo-PC-5th.md
Created September 6, 2024 23:38
Ludo as a playable character (PC) in Dungeons & Dragons 5th Edition

Ludo

Goliath Barbarian (Path of the Totem Warrior)
Medium Humanoid, Neutral Good


Armor Class 14 (Unarmored Defense)
Hit Points 85 (10d12 + 30)
Speed 40 ft.

@coliver
coliver / CountVonCount8thWizard.md
Created October 22, 2024 01:25
Pathfinder Stat sheet for Count Von Count 8th Level Wizard Vampire

Here’s a stat block for Count Von Count in Pathfinder 1st Edition:

Count Von Count

CR: 8
XP: 4,800
Race: Vampire
Class: Wizard 8
Alignment: Lawful Evil
Environment: Any urban
Organization: Solitary or with 1d4 minions (skeletons or zombies)