Skip to content

Instantly share code, notes, and snippets.

Hoping I don't break anything

Brian Goff cpuguy83

Hoping I don't break anything
Block or report user

Report or block cpuguy83

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
whistler /
Created Mar 16, 2015
Copy files to another repository while saving git history
# copied from
git clone <git repository A url> # clone source repository
cd <git repository A directory>
git remote rm origin # to make sure it doesn't affect the original repository
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed)
mv * <directory 1>
git add .
git commit
fred / clockwork_celluloid.rb
Created Jun 28, 2013
Running clockwork inside a Sidekiq Thread using Celluloid
View clockwork_celluloid.rb
### Rails.root/lib/scheduler.rb
require 'celluloid/autostart'
module AwesomeRailsApp
class ClockworkScheduler
include Celluloid
include Clockwork
def run
trongthanh / gist:2779392
Last active Jan 23, 2020
How to move a folder from one repo to another and keep its commit history
View gist:2779392
# source:
# 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://
# 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.
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

You can’t perform that action at this time.