Skip to content

Instantly share code, notes, and snippets.

View nwinkler's full-sized avatar

Nils Winkler nwinkler

  • FIS
  • Frankfurt, Germany
View GitHub Profile
@nwinkler
nwinkler / pom.xml
Last active March 25, 2023 20:49
Combining the git-flow branching model and the Maven Release Plugin to play nice. Based on info found here: http://vincent.demeester.fr/2012/07/maven-release-gitflow/
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>dummy</artifactId>
<name>Dummy Project</name>
<version>1.0.12</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://......</connection>
<tag>HEAD</tag>
@nwinkler
nwinkler / selectText.js
Last active August 29, 2015 14:03
Select text range in browser (outside of input fields)
/**
* From http://stackoverflow.com/a/987376/1228454
*
* 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
nwinkler / README.md
Last active July 26, 2017 02:03
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.

Prerequisites

  • 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
nwinkler / checkTestCases.sh
Created December 11, 2014 10:53
Find Jasmine test cases that contain `ddescribe` or `iit` and print a message to stderr
#!/bin/bash
# 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
nwinkler / README.md
Created March 10, 2015 07:51
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