Skip to content

Instantly share code, notes, and snippets.

View nedmas's full-sized avatar

Tom Densham nedmas

View GitHub Profile
@nedmas
nedmas / gist:3275932
Created August 6, 2012 15:59
Manually create Silverstripe 3 site
git clone https://github.com/silverstripe/silverstripe-installer.git public
git checkout 3.0
rm -rf .git/
git remote add upstream https://github.com/silverstripe/silverstripe-installer.git
git flow init -d
@nedmas
nedmas / gist:5803636
Created June 18, 2013 08:33
Fix MongoDb on Ubuntu
# Manually remove the lockfile:
sudo rm /var/lib/mongodb/mongod.lock
# Run the repair script:
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
# Run the MongoDb server:
sudo service mongodb start
# Check the MongoDb server status:
@nedmas
nedmas / secure-magento
Last active December 19, 2015 21:19
Simple shell script to set file permissions for a Magento installation.
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage : $0 [dir]"
exit
fi
chown -R dev:dev $1
@nedmas
nedmas / gist:6668968
Created September 23, 2013 10:52
Simple bash script to list out the current branch and status of all git repos in sub directories.
#!/bin/bash
GIT=$(which git)
SED=$(which sed)
PATH=${1:-$(pwd)}
for DIR in $PATH/*
do
if [ -d $DIR ]
then
@nedmas
nedmas / secure-silverstripe
Created December 12, 2013 14:27
Simple shell script to set file permissions for a SilverStripe installation.
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage : $0 [dir]"
exit
fi
chown -R dev:dev $1
@nedmas
nedmas / gist:44308410d4f643ea1739
Created January 15, 2016 12:31
SilverStripe SecureAssets Nginx Configuration
location ^~ /assets/ {
sendfile on;
rewrite ^(.*)$ /framework/main.php?url=$1 last;
}