Skip to content

Instantly share code, notes, and snippets.

@brake
brake / git-pushing-multiple.rst
Created October 13, 2019 18:49 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@brake
brake / StreamZip.java
Created March 9, 2017 17:11 — forked from kjkrol/StreamZip.java
Zipping streams using JDK8 with lambda
import java.util.Iterator;
import java.util.function.BiFunction;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
/**
* Zipping streams into parallel or sequential stream using JDK8 with lambda
*
* @author Karol Krol
*/
@brake
brake / gist:2b0b9ac746aaf12edced
Last active January 19, 2016 15:05 — forked from sgergely/gist:3793166
Some MidnightCommander keyboard shortcuts
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name