View README.md

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
View checkTestCases.sh
#!/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
View README.md

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.
View selectText.js
/**
* 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;
View pom.xml
<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>