Skip to content

Instantly share code, notes, and snippets.

View cognifloyd's full-sized avatar

Jacob Floyd cognifloyd

  • Garland, TX
  • 02:54 (UTC -05:00)
View GitHub Profile
@dpino
dpino / ns-inet.sh
Last active April 19, 2024 18:12
Setup a network namespace with Internet access
#!/usr/bin/env bash
# set -x
if [[ $EUID -ne 0 ]]; then
echo "You must be root to run this script"
exit 1
fi
# Returns all available interfaces, except "lo" and "veth*".
@kdambekalns
kdambekalns / README.md
Last active August 29, 2015 14:20
Using injected properties of Flow functional test in @dataProvider

PHPUnit collects the data from a dataProvider early during test execution, so the PersistenceManager instance is NULL, if used directly in the provider. Returning a closure that is re-bound during the the test makes this work.

@cognifloyd
cognifloyd / Guardfile
Last active August 29, 2015 14:03
Guard + Guard-PhpUnit2 + TYPO3.Flow based application
# http://erichogue.ca/2012/09/php/continuous-testing-in-php-with-guard/
#Unit Tests
guard 'phpunit2',
:command => './bin/phpunit',
:cli => '-c Build/BuildEssentials/PhpUnit/UnitTests.xml',
#Important! No trailing slash!
:tests_path => Dir.glob('Packages/{Framework,Applications,Boilerplates}/*/Tests/Unit'),
#realtime uses log-json which emits tons of Notices about "Array to string conversion" when testing TYPO3.Eel/Context
:realtime => true,
@robertlemke
robertlemke / nginx.conf
Created July 23, 2013 17:37
My very rudimentary nginx.conf file which I use for development on my Mac. I use a special setup with dnsmasq which redirects all URLs like foo.dev, foo.prod etc. to my localhost. I use Nginx in combination with PHP-FPM. You can do the same with Apache, see: https://gist.github.com/robertlemke/4951820
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@bradymiller
bradymiller / mirrorOpenEMR_sf_git
Created October 31, 2010 09:18
Script to mirror the SF git repo to github, gitorious, bitbucket, assembla and google code
#!/bin/bash
#
# Copyright (C) 2010 Brady Miller <brady@sparmy.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#