Skip to content

Instantly share code, notes, and snippets.

View egobude's full-sized avatar
happy programmer

Benedikt Schmitz egobude

happy programmer
  • ROSE Bikes GmbH
  • Bocholt, Germany
View GitHub Profile
egobude / gist:762f94b8ae7736d10ed60274694cea0f
Created October 20, 2017 12:31 — forked from nvanselow/gist:3c6fe71bef68554b1bb0
Codeception, Laravel, and PhantomJS

You can use Codeception to test Javascript, like DOM manipulations and Ajax requests. Out of the box it can manipulate DOM elements but can't execute Javascript code, like most testing frameworks. But it gives you the option to use a WebDriver, to connect to a headless browser, and mimic a user browsing your website. It gives you some options: Selenium2, ZombieJS and, the easiest to configure, PhantomJS.

This article covers the installation and usage of PhantomJS, and assumes you are using Laravel Homestead, but it will work on any relatively new Debian based distro, like Ubuntu 14.04.

###Install PhantomJS

Just run those commands to install it:

sudo apt-get update
egobude / adas
Created August 28, 2017 10:32
egobude / 01-gulpfile.js
Created July 12, 2017 08:03 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See for a write-up.
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
namespace Acme\Bundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
egobude / docker-compose.yml
Created April 26, 2017 14:56
Rancher - Load Balancer Setup
version: '2'
stdin_open: true
- /docker/nginx-phpfpm/data:/data
- /docker/nginx-phpfpm/nginx.conf:/etc/nginx/nginx.conf
- /docker/nginx-phpfpm/default.conf:/etc/nginx/conf.d/default.conf
tty: true
egobude / release.php
Created April 19, 2017 14:18
[WIP] Git Release Script
#!/usr/bin/env php
* updateComposerManifest
#function updateComposerManifest($version = null) {
# $composerManifest = print_r(json_decode(file_get_contents('composer.json'), true));
# if (isset($composerManifest['version']) {
egobude /
Created February 14, 2017 18:36 — forked from jeefy/
Rancher Compose Install Script
# To run locally: ` curl -s | sh `
tar zxf rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
rm rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose
egobude /
Last active August 3, 2017 06:31

Every Day Snippets


Listen on pings

$ tcpdump -i any icmp

Listen on any interface and port 5683

cat /etc/sysconfig/docker
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS=' --host=unix:///var/run/docker.sock --restart=false -g /opt/app/jenkins/docker -G jenkins'
egobude / Caches.yaml
Created February 2, 2016 13:17
Flow Framework Redis Cache
backend: TYPO3\Flow\Cache\Backend\RedisBackend
defaultLifetime: 0
hostname: ''
port: '6379'
backend: TYPO3\Flow\Cache\Backend\RedisBackend