Skip to content

Instantly share code, notes, and snippets.

View coreymcmahon's full-sized avatar

Corey McMahon coreymcmahon

View GitHub Profile
@Thinkscape
Thinkscape / PSR-0-final-proposal.md
Created September 22, 2011 10:30
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
@manuquentin
manuquentin / gist:6446360
Created September 5, 2013 05:24
Reset git file permissions
git config --global --add alias.permission-reset '!git diff -p -R | grep -E "^(diff|(old|new) mode)" | git apply'
git permission-reset
@warnergodfrey
warnergodfrey / gist:7512051
Last active September 21, 2018 03:20
Access the ATO Business Portal using AusKey Mac OS X Mountain Lion
  • Install the latest JRE from Oracle
  • In the Java Control Panel, go to the Security tab and make sure 'Enable Java Content' is checked
  • Open Safari
  • Go to the ATO Business portal site https://bp.ato.gov.au/BpStatics/homepage.htm
  • Click Login
  • A dialog will apear asking you 'Do you want to trust the website “authentication.business.gov.au” to use the “Java” plug-in?'
  • Click 'Trust'
  • Now you will be asked 'Do you want to run this application?'
  • Click 'Run'
  • Another dialog will appear asking you to 'Allow access to the following application from this website?'
@crynobone
crynobone / update.sh
Created February 7, 2014 01:08
Laravel project deploy script
cd /var/www/project
composer self-update
php artisan down
rm /var/www/project/bootstrap/compiled.php
git reset --hard
git pull
echo "<?php return \"production\";" > bootstrap/environment.php
composer install --no-dev
find /var/www/project/public/packages -type d -exec chmod 775 {} \;
find /var/www/project/public/packages -type f -exec chmod 664 {} \;
@aspnetde
aspnetde / upload-ipa-to-itunes-connect.sh
Created November 26, 2015 23:07
A small script that uses XCode's Application Loader to automatically submit an IPA to iTunes Connect
#!/bin/bash
set -ex
# Originally from https://gist.github.com/jedi4ever/b1f8b27d4a803d487fa4
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status
# Requires application loader to be installed
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html
@nivv
nivv / PHP 7 - Installing imagick on Ubuntu 14.04.md
Last active November 28, 2021 11:38
Guide - Enable imagick on PHP7

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@phpfour
phpfour / deploy.php
Created August 15, 2017 06:12
Simple Laravel Deployment with Release Notes as Slack notification
<?php
// See: https://github.com/foodkit/jira-release-notes
// See: https://github.com/foodkit/laravel-deployer
namespace Deployer;
require __DIR__.'/vendor/foodkit/laravel-deployer/src/laravel-norevision.php';
use Symfony\Component\Console\Input\InputOption;