Skip to content

Instantly share code, notes, and snippets.

View markwillis82's full-sized avatar

Mark Willis markwillis82

  • Poole, United Kingdon
View GitHub Profile
### Keybase proof
I hereby claim:
* I am markwillis82 on github.
* I am markwillis82 (https://keybase.io/markwillis82) on keybase.
* I have a public key ASB6u562Xjw-ugP7UjSHVRFvOtgL9sNY5laWLYYFrWpU_Ao
To claim this, I am signing this object:
@markwillis82
markwillis82 / site.conf
Created July 12, 2013 07:31
nginx config setup for modx + statcache
server {
root /path/to/site;
index index.php;
server_name somedomain.co.uk www.somedomain.co.uk;
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
@markwillis82
markwillis82 / modxContext.feature
Last active December 19, 2015 11:29
Example Behat Tests
Feature: check the correct context gets loaded for urls
When on a dev/test the modx context should switch
based on domain
Scenario: Check the baseUrl on the homepage
When am on "/"
Then I should see "Venues & Centres"
And I change to "littledown" context
Then I should see "Membership"
And I should see "Parkland"
@markwillis82
markwillis82 / migrateRepo.sh
Last active December 19, 2015 11:28
Subversion to git conversion
echo "git - svn conversion"
git svn clone file:///repos/dev.server --authors-file=users.txt --no-metadata -s devGitRepo
echo "Clean up branches"
cd bhlive.git/
git remote add origin <add remote repo url>
git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; do git branch "$branchname" "refs/remotes/$branchname"; git branch -r -d "$branchname"; done
echo "push to BitBucket"