Skip to content

Instantly share code, notes, and snippets.

@jacob-faber
jacob-faber / GitHub-Forking.md
Created June 28, 2021 15:28 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@jacob-faber
jacob-faber / takeout-merge.sh
Created November 12, 2019 07:48
Google Takeout Merge Tool: Unzips and merges all your exported data into a single folder
#!/usr/bin/env bash
destDir="../Takeout-merge"
mkdir -p $destDir
# Merges the different unzipped Takeout folders into one
for p in $(seq -f "%03g" 1 ${1:-1}); do
if [ -f $p/DONE ]; then
echo "Skipping $p/Takeout ... "
@jacob-faber
jacob-faber / ip_firewall_filter.rsc
Created September 4, 2019 13:41 — forked from SmartFinn/ip_firewall_filter.rsc
MikroTik (RouterOS) Zone-Based Firewall Example
# jan/29/2018 22: 4:17 by RouterOS 6.41
#
/interface list
add name=public comment="public network"
add name=local comment="local network"
add name=guest comment="guest network"
# Change the interfaces below to your own
/interface list member
add list=public interface=ether1
#!/usr/bin/env bash
/home/camabeh/.sdkman/candidates/kotlin/current/bin/kotlinc -script "$@"
@jacob-faber
jacob-faber / starttmux.sh
Created November 26, 2018 11:43 — forked from todgru/starttmux.sh
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jacob-faber
jacob-faber / zsh.md
Created November 14, 2018 22:43 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@jacob-faber
jacob-faber / setuid-example.sh
Created August 21, 2018 11:32
Setuid example
# SUID is ignored for interpreted languages (shell scripts, etc...)
tee setuid-example.c <<EOF
#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv) {
printf("%d", geteuid());
return 0;
}
@jacob-faber
jacob-faber / openshift-cheatsheet.md
Created August 20, 2018 10:36 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Change Default response timeout for a specific route:
oc annotate route <route_name> --overwrite haproxy.router.openshift.io/timeout=10s
  • Add a nodeSelector on RC ou DC
oc patch dc|rc <dc_name> -p "spec:                                                                                         
  template:     
@jacob-faber
jacob-faber / gist:7af777dc78e21bea956a366d71499b45
Created August 10, 2018 08:10
journal- openshift 3.10 proxy bug
This file has been truncated, but you can view the full file.
Aug 10 08:01:04 master-local-fix.192.168.100.10.nip.io origin-node[3677]: E0810 08:01:04.252284 3677 reflector.go:205] github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go:461: Failed to list *v1.Node: Get https://master.192.168.100.10.nip.io:8443/api/v1/nodes?fieldSelector=metadata.name%3Dmaster-local-fix.192.168.100.10.nip.io&limit=500&resourceVersion=0: dial tcp 192.168.100.10:8443: getsockopt: connection refused
Aug 10 08:01:04 master-local-fix.192.168.100.10.nip.io origin-node[3677]: E0810 08:01:04.252143 3677 reflector.go:205] github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go:452: Failed to list *v1.Service: Get https://master.192.168.100.10.nip.io:8443/api/v1/services?limit=500&resourceVersion=0: dial tcp 192.168.100.10:8443: getsockopt: connection refused
Aug 10 08:01:04 master-local-fix.192.168.100.10.nip.io origin-node[3677]: E0810 08:01:04.251879 3677 reflector.go:205] github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubelet/config/a