Skip to content

Instantly share code, notes, and snippets.

View jhnns's full-sized avatar
🧀
When in doubt add cheese!

Johannes Ewald jhnns

🧀
When in doubt add cheese!
View GitHub Profile
@jhnns
jhnns / git-pr
Last active March 15, 2021 07:50
Git custom command to quickly checkout pull-requests from different origins as described in https://help.github.com/articles/checking-out-pull-requests-locally. Place this file somewhere in your path and git will run it everytime you type `git pr ...`
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: git pr [clean] [<remote>] <id-or-url>"
echo ""
echo "Examples:"
echo "git pr 42 --> git fetch origin pull/42/head:pr/origin/42"
echo "git pr upstream 42 --> git fetch upstream pull/42/head:pr/upstream/42"
echo "git pr https://github.com/peerigon/phridge/pull/1 --> git fetch https://github.com/peerigon/phridge.git pull/1/head:pr/peerigon/phridge/1"
echo "git pr clean --> Deletes all branches that match pr/*/* and pr/*/*/*"
@jhnns
jhnns / keybase.md
Last active January 11, 2016 16:18
keybase.md

Keybase proof

I hereby claim:

  • I am jhnns on github.
  • I am jhnns (https://keybase.io/jhnns) on keybase.
  • I have a public key whose fingerprint is 2058 5782 AA7D DE05 D0C7 E310 F039 D35B D529 A432

To claim this, I am signing this object:

@jhnns
jhnns / .travis.yml
Created May 19, 2014 14:17
Use coveralls via travis ci
language: node_js
node_js:
- "0.10"
- "0.11"
script:
- npm test
after_success:
- npm install -g istanbul
- npm install coveralls
@jhnns
jhnns / gist:5295988
Created April 2, 2013 20:42
How to fix "Cannot read TWAIN source" / "SCANINTF.DLL missing" errors on Windows
- Search for `C:\Windows\twain_32\CNQ4804` or something similar
- Add this path to your "Path" environment variable
- Restart your application (e.g. Photoshop x32)
@jhnns
jhnns / gist:5192282
Last active October 10, 2020 13:26
Contents of httpd-vhosts.conf when running multiple virtual host with xampp. https:// only works after creating a certificate as described here: http://robsnotebook.com/xampp-ssl-encrypt-passwords
## It's important to use normal slashes for paths also on windows
<VirtualHost *:80>
DocumentRoot "C:/Users/jhnns/dev/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/Users/jhnns/dev/peerigon.dev"
ServerName peerigon.dev