Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 20, 2024 12:37
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- 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
@rrosiek
rrosiek / install_mysql.sh
Last active June 5, 2023 07:08
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@darcyparker
darcyparker / installNeovim.sh
Last active January 13, 2024 04:28
Build and install neovim for Debian
#!/usr/bin/env bash
#Build and install neovim for Debian
#See: https://neovim.io/
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start
#See: https://gist.github.com/darcyparker/153124662b05c679c417
#Save current dir
pushd . > /dev/null || exit
@vigosan
vigosan / install_nvim.sh
Last active February 27, 2018 21:51
Build and install neovim for Debian
#!/usr/bin/env bash
# Build and install neovim for Debian
pushd .
mkdir -p ~/src
cd ~/src
# Install cmake 2.8.10
cmake_package="cmake-3.3.1"
@pmbaumgartner
pmbaumgartner / sklearn_custom_scorer_labels.py
Last active August 14, 2018 17:12
Making a custom scorer in sklearn that only looks at certain labels when calculating model metrics. For example: This creates a f1_macro scorer object that only looks at the '-1' and '1' labels of a target variable.
from sklearn.metrics import f1_score, make_scorer
scorer = make_scorer(f1_score, labels=[-1, 1], average='macro')
# use like:
cv = cross_val_score(model, X, Y, scoring=scorer)
@bbengfort
bbengfort / Makefile
Created January 10, 2016 19:20
Basic Python Project files - my Makefile and the dependencies that I have in everything.
# Shell to use with Make
SHELL := /bin/bash
# Set important Paths
PROJECT := # Set to your project name
LOCALPATH := $(CURDIR)/$(PROJECT)
PYTHONPATH := $(LOCALPATH)/
PYTHON_BIN := $(VIRTUAL_ENV)/bin
# Export targets not associated with files
@lornajane
lornajane / mac.md
Last active May 20, 2024 14:56
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments