Skip to content

Instantly share code, notes, and snippets.

View thomasjo's full-sized avatar
🍉

Thomas Johansen thomasjo

🍉
View GitHub Profile
@thomasjo
thomasjo / mintedSweave.R
Created February 5, 2016 19:24 — forked from rundel/mintedSweave.R
Modified Rweave driver and functions to use minted
RweaveLatexMinted <- function()
{
list(setup = RweaveLatexSetup,
runcode = RweaveLatexRuncodeMinted,
writedoc = RweaveLatexWritedocMinted,
finish = RweaveLatexFinish,
checkopts = RweaveLatexOptions)
}
makeRweaveLatexCodeRunnerMinted <- function(evalFunc=RweaveEvalWithOpt)
@thomasjo
thomasjo / git-prs.md
Created July 7, 2016 17:56 — forked from weppos/git-prs.md
PRs as Git Branches

If you want to download GitHub PRs to your local repository, you can use a little trick to download them as local branches.

Open the repository configuration file (.git/config) and search for the origin block. Change it from:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:USERNAME/REPOSITORY.git
@thomasjo
thomasjo / pr.md
Created July 8, 2016 04:44 — forked from piscisaureus/pr.md
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 = [email protected]: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:

@thomasjo
thomasjo / global-protect.sh
Created April 19, 2022 12:23 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)