Skip to content

Instantly share code, notes, and snippets.

View rowland007's full-sized avatar
🕶️
Working work things

Randy Rowland rowland007

🕶️
Working work things
View GitHub Profile
@rowland007
rowland007 / fedora30.conf
Last active July 17, 2019 05:26
Personal initial configuration for Fedora 30
#!/bin/bash -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
cd /home/$USER/
echo "Changing directory to: $(pwd)"
echo "Removing bloatware..."

Git Message Template

Place the below file into a directory that will be hidden away like ~/.config/ and name it .git-commit-template.txt. You will then have to run a git config to enable it.

git config --global commit.template /home/$USER/.config/.git-commit-template.txt

To prevent git from using the template as the commit message if you allow empty commit message, you'll need to set this:

@rowland007
rowland007 / UpstreamRepos.md
Created April 19, 2019 09:47
Describes how to add an upstream remote repo to your forked/cloned repo to get the latest updates.

Keep a Downstream git Repository Current with Upstream Repository Changes

A downstream repository (aka a “fork”) maintainer commonly needs to stay current with upstream work (aka "original"). The case is development continues on the upstream repo while you work on your own origin fork. You want to fetch the upstream changes and apply them to your origin so you don't make conflicts.

image cannot be displayed

The following steps allow you to achieve this on the command line in a local git repository.

Add the Remote Upstream Repository

@rowland007
rowland007 / MergeVsRebase.md
Created April 19, 2019 09:45
Describes the differences between git merge and git rebase and when you should use them.

In our project’s Git repository, two branches currently exist: the usual master branch, and a feature branch that we created right after the initial commit. On the master branch, we have italicized the ‘a’, then bolded the ‘a’. On our feature branch, we have italicized the ‘b’, and then bolded the ‘b’.

image

Merge

By merging feature into master, master obtains a new commit — a “merge commit”.

image

@rowland007
rowland007 / GitFlow.md
Created April 19, 2019 09:43
Describes how you should use git flow and branching to manage repositories

Git Flow & Branching

The Main Branches

At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:

  • master
  • develop
@rowland007
rowland007 / syncthing.desktop
Created February 3, 2019 00:51
Start Syncthing automatically upon login
[Desktop Entry]
Type=Application
Exec=/usr/bin/syncthing -no-browser
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Syncthing
Name=Syncthing
# Place this file in ~/.config/autostart/ to have syncthing begin as soon as $USER logs in
@rowland007
rowland007 / coreboot-files.sh
Last active November 10, 2022 18:37
Building coreboot from source
#!/bin/bash -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
apt update; apt upgrade -y; apt autoclean -y; apt autoremove
apt install -y git build-essential bison flex m4 zlib1g-dev gnat libpci-dev libusb-dev libusb-1.0-0-dev pv dmidecode bsdiff python2.7
mkdir ~/updates && cd ~/updates && wget https://source.puri.sm/coreboot/utility/raw/master/coreboot_util.sh -O coreboot_util.sh
@rowland007
rowland007 / Source-Header Template
Last active February 3, 2019 00:54
Template used at the top of header and source files
/************************************************************************
Program:
Author:
Class:
Instructor:
Date:
Description:
Input:
Output:
Known bugs:
@rowland007
rowland007 / git-message-template
Last active January 27, 2019 06:28
git message template
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other
# resources
# Example
# Resolves: issue #23
@rowland007
rowland007 / openpgp.txt
Created January 7, 2018 13:45
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:4128c6d560d78ad3ab9403c686eddad38acd28a5]