Skip to content

Instantly share code, notes, and snippets.

alias ll='ls -lGaf'
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
@tzinsky
tzinsky / .zshrc
Last active October 21, 2021 18:15
ZSHell RC file
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Set path if required
#export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step).

    git clone git@github...some-repo.git
@tzinsky
tzinsky / Python3 Virtualenv Setup.md
Created March 17, 2022 03:53 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@tzinsky
tzinsky / syncFork.bash
Last active August 24, 2023 14:14
Sync forked repo
Ensure the remote is addes as an upstream repo:
# Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
# Fetch all the branches of that remote into remote-tracking branches
git fetch upstream
@tzinsky
tzinsky / disableJobs.groovy
Created January 9, 2024 16:09
Groovy code to disable all Jenkins Jobs
jenkins = Hudson.instance
jenkins.instance.getView("<insert view name here>").items.each { item ->
println "\nJob: $item.name"
item.disabled = true
}
@tzinsky
tzinsky / DeleteJenkinsJobs
Last active January 25, 2024 16:23
Delete all Jenkins Jobs
for(j in jenkins.model.Jenkins.theInstance.getAllItems()) {
j.delete()
}
Jenkins.instance.getNode('<NODE NAME>').toComputer().setAcceptingTasks(true);