Skip to content

Instantly share code, notes, and snippets.

View coppolat1's full-sized avatar

Tom Coppola coppolat1

  • Long Island, NY
View GitHub Profile
@RichardBronosky
RichardBronosky / README.MD
Last active October 10, 2024 11:11
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@samiraguiar
samiraguiar / MC Cheat Sheet
Last active November 10, 2024 16:02 — forked from maciakl/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.
You can also use "ESC" instead of "ALT", which is useful on Macbooks.
Main View
---------------------------------------------------------------
- File/directory operations
@trongthanh
trongthanh / gist:2779392
Last active September 8, 2024 09:15
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@lamberta
lamberta / .emacs
Created October 27, 2009 21:29
using a git repo as a todo list
;;add to your .emacs
(defun git-commit-file-and-push (&optional commit-msg)
"Commit current file and push to git repository."
(interactive)
(if (null commit-msg)
(setq commit-msg (read-from-minibuffer "Commit message: ")))
(if (buffer-modified-p (current-buffer))
(if (y-or-n-p "Save modified buffer? ")
(save-buffer)))