Skip to content

Instantly share code, notes, and snippets.

View ex-nerd's full-sized avatar

Chris Petersen ex-nerd

View GitHub Profile
@ex-nerd
ex-nerd / git_file_branches.sh
Created August 24, 2023 08:41
Given a file path, it lists all remote branches that have modified that path
#
# I needed this for something and was surprised that I couldn't find an easy answer elsewhere.
# So here it is just in case a search engine picks it up.
#
# Given a file path, it lists all remote branches that have modified that path
#
function git_file_branches() {
echo -e "date\tbranch\tauthor"
for BRANCH in $(git log --remotes --no-merges --not develop --source --decorate=short -- $1 | grep ^commit | cut -f 2 | uniq); do
git log -1 --date=format-local:'%Y-%m-%d %H:%M:%S' --pretty=format:"%ad%x09%D%x09%an <%ae>" $BRANCH 2>/dev/null | sort
@ex-nerd
ex-nerd / low_carb_cheesecake.md
Last active April 3, 2021 05:57
My low carb chocolate cheesecake recipe

Chocolate Cheesecake

Crust

1 cup almond flour (120g, 5-3g per 28g) 1/2 cup carbquik (50g, 16-14g per 32g) 1/3 cup cocoa (36g, 3-2g per 6g) 1/3 cup sugar substitute (67g if allulose/lakanto/swerve) 1/4 cup melted butter 2 tbsp cream

@ex-nerd
ex-nerd / kosselpro_prusaslicer_start.gcode
Created October 22, 2019 07:22
kossel pro prusaslicer intro gcode
; Start heating up the base first (takes logest)
M140 S[first_layer_bed_temperature]
; Set the standby and active temperatures for "both" tools
G10 P0 R[temperature_0] S[temperature_0]
G10 P1 R[temperature_1] S[temperature_1]
; Home to top 3 endstops
G28
@ex-nerd
ex-nerd / render_puzzle_boxes.py
Last active December 21, 2018 07:14
Automatic rendering script for Russian Doll Maze Puzzle Box
#!/usr/bin/env python3
#
# Automatic rendering script for Russian Doll Maze Puzzle Box
# https://www.thingiverse.com/thing:2410748
#
# This file is licensed under: https://creativecommons.org/licenses/by/3.0/
# Source for file is at: https://gist.github.com/ex-nerd/2413d8e6f876b3857bde552f61235071
# Number of nested mazes to generate (you will also get
num_mazes = 3
@ex-nerd
ex-nerd / cleanup_prusa_slic3r_gcode.py
Last active January 4, 2022 13:17
Gcode cleaner to work around prusa slic3r annoyances for multi-tool printing on non-Prusa printers.
#!/usr/bin/env python
"""
Gcode cleaner to work around prusa slic3r annoyances for multi-filament
single-tool printing on non-Prusa printers.
This gist can be found here:
* https://gist.github.com/ex-nerd/22d0a9796f4f5df7080f9ac5a07a381f
Bugs this attempts to work around:
* https://github.com/prusa3d/Slic3r/issues/557
@ex-nerd
ex-nerd / do_crashplan_upgrade.sh
Last active December 26, 2015 14:29
Synology Crashplan upgrade
# Fix a failed Crashplan upgrade on a Synology NAS.
# This function should be run directly on the NAS, as root.
#
# Based on Chris Nelson's blog post from here:
# http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/
function do_crashplan_upgrade() {
cp_target_dir="/var/packages/CrashPlan/target"
cp_upgrade_jar=`ls -t -1 "$cp_target_dir/upgrade/"*jar | head -n1`
cp_version=`basename "$cp_upgrade_jar" .jar`
@ex-nerd
ex-nerd / affirmation
Created June 16, 2015 17:18
MuleSoft Contributor Agreement Acceptance by Chris Petersen
I, Chris Petersen, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Tue Jun 16 2015 10:18:47 GMT-0700 (PDT)
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 4570e34..220e4cd 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -73,7 +73,7 @@
// 88 = 5DPrint D8 Driver Board
#ifndef MOTHERBOARD
-#define MOTHERBOARD 7
+#define MOTHERBOARD 82
@ex-nerd
ex-nerd / communication.md
Last active August 29, 2015 13:57
Being part of the Open Source community

With contributors and users often separated by thousands of miles and many timezones, good communication is a huge part of what makes the Open Source community work. There are three main methods of group communication used by most open source projects, and understanding how to navigate them will help you get answers to your questions sooner so you can get your job done faster.

Mailing Lists

Also known as a listserv (not “listserve” or “list server” ), many open source project use these email lists as a way for users to support each other, get in touch with developers, and keep up to date with the latest development news about a favorite project.

Many "old school" developers tend to prefer this method of communication over more modern developments like web forums, and you will find that a project's mailing list is often still the best way to get help directly from the core development community. Almost all of these lists are archived in multiple locations and ind

@ex-nerd
ex-nerd / git_hub.sh
Last active December 21, 2015 02:29
Bash function to view the current repository/branch on github. Should work fine with multiple remotes.
# Opens the current branch on github.com, if possible.
# Would call this "github" but it conflicts with github's own CLI app to open their desktop app.
git_hub() {
BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref @{u} 2>/dev/null`
if [[ $? != 0 ]]; then
echo "Not currently in a git repository"
return
fi
if [[ -z $BRANCH ]]; then
echo "Can't determine current git branch name"