Skip to content

Instantly share code, notes, and snippets.

@Elucidation
Elucidation / fork_sync.md
Last active May 20, 2016 20:50
Forking/Syncing Cheatsheet

Step One - Fork Repo

Following these Forking instructions

  1. Go to main/repo and fork it from the top right.
  2. Go to your forked repo your/repo (ex. Elucidation/repo) and get the clone address.
  3. Clone it on your local machine, ex. git clone git@github.com:Elucidation/repo.git

Step Two - Sync fork to upstream

@dtao
dtao / increment_decrement.py
Created May 25, 2012 16:10
Sublime Text plugin to increment/decrement all selected numbers
import sublime
import sublime_plugin
class NumberCommand(sublime_plugin.TextCommand):
def run(self, edit):
selection = self.view.sel()
for region in selection:
try:
value = int(self.view.substr(region))
self.view.replace(edit, region, str(self.op(value)))