Skip to content

Instantly share code, notes, and snippets.


Nils Winkler nwinkler

  • FIS
  • Frankfurt, Germany
View GitHub Profile
nwinkler /
Created Mar 10, 2015
Vagrant-proxyconf configuration using the host's proxy environment variables

vagrant-proxyconf with host proxy environment variables

To use the proxy environment variables of the host OS, insert the snippet into your Vagrantfile. Instead of having to manually define the proxy settings, it will use the settings from the host shell where you run Vagrant.

You need to install the vagrant-proxyconf plugin for this to work:

vagrant plugin install vagrant-proxyconf
nwinkler /
Created Dec 11, 2014
Find Jasmine test cases that contain `ddescribe` or `iit` and print a message to stderr
# This script can be used to verify that there aren't any test cases containing ddescribe or iit.
# Steps:
# Finds the following files: *Spec.js, *.spec
# Checks whether the files contain one of the patterns "ddescribe" or "iit"
# If one of the patterns is found, exits with code 1
find . -name *Spec.js -o -name *.spec | xargs grep -e "ddescribe" -e "iit" >&2
nwinkler /
Last active Jul 26, 2017
Start Xvfb from Grunt

Running Xvfb from Grunt

This Gist shows how to start and stop Xvfb from a Grunt script as part of your build. This is useful if you want to run unit tests in a browser in a headless setting.


  • Make sure that Xvfb is installed on your system, e.g. through your Linux distribution's package manager.
  • Make sure that the Xvfb executable is on your PATH.
nwinkler / selectText.js
Last active Aug 29, 2015
Select text range in browser (outside of input fields)
View selectText.js
* From
* Cross-browser function for selecting text ranges.
* @param element A jQuery element that has the text.
function selectText(element) {
var doc = document,
range, selection;
nwinkler / pom.xml
Last active Oct 6, 2020
Combining the git-flow branching model and the Maven Release Plugin to play nice. Based on info found here:
View pom.xml
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<name>Dummy Project</name>
You can’t perform that action at this time.