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 / 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
@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 / .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 / 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 / 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 / in.css
Created February 2, 2016 16:31
postcss-merge-rules bug (see https://github.com/ben-eb/postcss-merge-rules/issues/14) with `cssnano v3.4.0 (cli v1.0.3)`
.a {
font-family: Arial;
font-family: Helvetica;
}
.b {
font-family: Arial;
}
var phridge = require('phridge');
var simpleLogScript = require.resolve('./simpleLogScript.js');
var phantomInstances = {};
function spawnPhantom(id) {
return phridge.spawn()
.then(function (phantom) {
phantomInstances[id] = phantom;
@jhnns
jhnns / idea.md
Created February 19, 2016 14:56
angular 1 babel plugin idea

angular 1 babel plugin idea

Mitigates angular module boilerplate with ES2015 modules based on naming conventions:

import template from "./modal.html";
import UserService from "./UserService";
import AnotherService from "./AnotherService";

function ModalDirective() {
npm run build

commented webpack.optimize.UglifyJsPlugin

build/static/app/css/styles.css

._1gwPWr77dmf4i5iRBt9FXY {
  border-color: #1abc9c !important; }
@jhnns
jhnns / gpg.md
Created November 4, 2016 16:17 — forked from LauLaman/gpg.md
Use GPG to sign commits using git & PHPStorm

1 - install GPG tools : https://gpgtools.org/

2 - Create new key for your github email

3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY

4 - configure git to sign all commits: git config --global commit.gpgsign true

5 - add to the bottom of ~/.gnupg/gpg.conf: