Skip to content

Instantly share code, notes, and snippets.

@jacob-faber
jacob-faber / intellij.md
Last active June 12, 2018 11:09 — forked from uarun/intellij.md
Intellij IDEA - Cheat Sheet (aka useful shortcuts) #idea

Intellij IDEA - Cheat Sheet (aka most useful shortcuts)

Note: Some of these keymapping are specific to IdeaVim plugin. If you don't use IdeaVim (what' wrong with you :)), I've tried to point out where they differ, but I could have missed a few

Coding Session

Parameter documentation for Method Calls

  • Ctrl-P - Popup parameter documentation for method calls
@jacob-faber
jacob-faber / cheatsheet.md
Created August 22, 2017 06:45 — forked from hay/cheatsheet.md
Hay's dev cheatsheet
@jacob-faber
jacob-faber / docker-cleanup-resources.md
Created July 13, 2018 07:07 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jacob-faber
jacob-faber / switch-local-git-repo-to-fork.md
Created July 20, 2018 13:16 — forked from jpierson/switch-local-git-repo-to-fork.md
How to move to a fork after cloning

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)

@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 / zsh.md
Created November 14, 2018 22:43 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@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"
@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
@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 ... "