Skip to content

Instantly share code, notes, and snippets.

@byplayer
byplayer / MC Cheat Sheet
Last active February 10, 2021 03:23 — forked from samiraguiar/MC Cheat Sheet
Midnight Commander Cheat Sheet / Shortcuts
Note for newcomers:
In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention
used in the Midnight Commander documentation and was kept here.
Main View
---------------------------------------------------------------
- File/directory operations
F3 View file
Shift + F3 View raw file (disregard extension)
F5 Copy selected files
#!/bin/bash
function install(){
REPO=$1
DIR=$2
TARGET=$3
BUILD_DIR=~/buildxcodeplugins/work
mkdir -p ${BUILD_DIR}
rm -rf ${BUILD_DIR}/*
@byplayer
byplayer / gist:3629153
Created September 5, 2012 02:05 — forked from freshtonic/gist:1999083
Git hook to disallow non-fastforward updates (also disallows merges into feature branches in order to keep them cleanly rebaseable)
#!/usr/bin/env ruby
# This update hook enforces the following policies
# 1) release and master branches are fast-forward only
# 2) feature branches cannot contain merges
$refname = ARGV[0]
$oldrev = ARGV[1]
$newrev = ARGV[2]