Skip to content

Instantly share code, notes, and snippets.

@houjunchen
houjunchen / pr.md
Last active February 14, 2023 14:31 — forked from piscisaureus/pr.md
Checkout Bitbucket Server pull requests locally

Locate the section for your Bitbucket Server remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@<your repo url>

Now add the line fetch = +refs/pull-requests/*/from:refs/remotes/origin/pull-requests/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@rustle
rustle / gist:4115414
Created November 20, 2012 01:45
Source Tree with Kaleidoscope 2 beta

SourceTree does not yet officially support Kaleidoscope 2, so here is how to set it up:

In Preferences, under Diff:

Screen Shot

You can try selecting Kaleidoscope, but we have had reports of mixed results. Some people have rebuilt their launch services database and restarted and been able to use Kaleidoscope this way:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain use

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet
@dch
dch / gist:1411446
Created November 30, 2011 22:33 — forked from taxilian/gist:1095427
Building libcurl and openssl on windows statically

Building static libcurl and openssl on Windows

These instructions were tested on Windows 7 Professional w/ Visual Studio 2010

Building openssl

  1. Download the latest openssl from the website; at the time of this writing, it is 1.0.0d
  2. Extract it to your drive; I put it in c:\code\openssl-1.0.0d
  3. install ActiveState perl unless you already have a non-cygwin perl installed on windows