place this file in your project root
chmod +x updateprojects.sh
to make it executable, then run
sh updateprojects.sh
to update all your git projects
| # fix homebrew permissions first | |
| sudo chown -R $(whoami):admin /usr/local | |
| # update brew | |
| brew update | |
| # override el capitan's deprecated version of OpenSSL | |
| brew install openssl | |
| brew link openssl --overwrite | |
| #fix ruby | |
| brew uninstall ruby-build rbenv | |
| brew install rbenv ruby-build |
| #!/bin/sh | |
| # vagrant2vb.sh | |
| # | |
| # Made for use alongside the excellent ievms - | |
| # https://github.com/xdissent/ievms | |
| # | |
| # Will export the local hosts (from /etc/hosts) | |
| # to a batch script & add that batch script to a Windows VM | |
| # The batch script will be executed to import the hosts onto the VM | |
| # The batch file seems convoluted, until you only want to append the new hosts. |
| rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm | |
| rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm | |
| yum update -y | |
| yum remove mysql-libs | |
| yum install httpd -y | |
| yum install mysql55-server -y | |
| yum install php54 php54-mysql php54-gd php54-mcrypt php54-devel php54-mbstring httpd-devel -y |
| <?php | |
| // I have Groups. A group can have many discussions. A single discussion can have many posts. | |
| // models/Group.php | |
| public function delete() | |
| { | |
| // Check for discussions belonging to the group first | |
| if ($this->discussions) { | |
| foreach ($this->discussions as $discussion) { | |
| $discussion->delete(); | |
| } |
place this file in your project root
chmod +x updateprojects.sh
to make it executable, then run
sh updateprojects.sh
to update all your git projects
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my ($previous_head, $current_head, $is_branch_checkout) = @ARGV; | |
| my ($is_on_facelift, $run_compass) = 0; | |
| if ($is_branch_checkout) { | |
| $is_on_facelift = `git branch | grep -e "^\*.*facelift"`; | |
| chomp $is_on_facelift; |
| # sudo ./vhoster.sh example.com | |
| NGINX_CONFIG='/etc/nginx/sites-available' | |
| NGINX_SITES_ENABLED='/etc/nginx/sites-enabled' | |
| WEB_DIR='/vagrant' | |
| SED=`which sed` | |
| CURRENT_DIR=`dirname $0` | |
| if [ -z $1 ]; then | |
| echo "No domain name given" |
| { | |
| "bold_folder_labels": true, | |
| "file_exclude_patterns": | |
| [ | |
| ".DS_Store", | |
| "dump.rdb", | |
| ".git*" | |
| ], | |
| "folder_exclude_patterns": | |
| [ |
| server { | |
| listen 80; | |
| server_name lucid32.dev; | |
| access_log /var/log/nginx/localhost.access.log; | |
| ## Default location | |
| location / { | |
| root /vagrant/yourprojectname; | |
| index index.php; | |
| } |