This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Receive POST requests from bitbucket.org and pull latest based on incoming branch filtering. | |
* Note: You'll need to setup www-data user (Debian) with SSH keys in the /var/www/.ssh dir and add the public key to bitbucket's UI. | |
*/ | |
class bitbucketGit { | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Create a new SilverStripe project in seconds. | |
# Russell Michell <russell@silverstripe.com> | |
# | |
# TODO | |
# 1). Add support for a greater range of composer executables | |
# 2). Add support for a greater range of webservers | |
# 3). Ping the repo to ensure it isn't down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Russell Michell 2015 <russell.michell@deviate.net.nz> | |
# | |
# Custom wrapper around /proc/meminfo designed to be invoked by something like `watch -n1 maxmem.sh` | |
# and run on a server under siege for RAM usage analysis. The script outputs used memory in Mb to a file which can | |
# be further analysed thus: | |
# | |
# cat outfile.out | sort -nr | head -1 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://listen.di.fm/public3/trance.pls | |
http://listen.di.fm/public3/vocaltrance.pls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* In order to tell whether any Fluent-enabled (FLuent augmented) ORM queries | |
* exist on the current object and whether or not they have data, we need to | |
* hook into all ORM queries made on each page. The result of which can be cached | |
* somewhere and consumed accordingly. | |
* | |
* Note: Doesn't augment anything. We're using augmentSQL() as an "entry-point". | |
* | |
* @param SQLQuery $query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Determines if the current page has any translations. | |
* | |
* "Translation" means: | |
* | |
* >=1 of a page's translated fields e.g. `Title_ar_EG` is populated, And/Or | |
* >=1 of a page's `has|many_xxx` related classes, itself has >=1 translated + populated field(s), And/Or | |
* >=1 of a page's arbitrary ORM calls to a DataObject sub-class, itself has >=1 translated & populated field(s) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHPStorm Issues | |
## Environment | |
Ubuntu 14.04 / phpStorm 9.0.2 / OpenJDK 1.7.0_79 / Acer Aspire TimelineX | |
## Bugs | |
The IDE occassionally stalls such that I can no longer edit, or make any changes whatsoever to any | |
tabs that remain open. Neither can I move the caret around using up/down keys. If I switch to another project (in the same window) I cannot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ss-upgrader.sh | |
# | |
# INTRODUCTION | |
# | |
# There are some threads on the SS forums that describe the techdocs for upgrading a 2.4 site to 3.x as being too technical. Mainly from content authors who | |
# also happen to be site maintainers - they are not coders. | |
# The aim of this script is to therefore to automate - in as much as this is possible in a user-configured, open-source software project - to help those new to | |
# SS3 upgrade from 2.x as smoothly as possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Random notes from PHP Conf NZ 2015 | |
* What core PHP functionality relies on SPL? (Core PHP5 interfaces for everyday use: http://php.net/manual/en/intro.spl.php) | |
* Take another look at Generators (Reduced memory footprint vs std iteration: http://php.net/manual/en/language.generators.overview.php) | |
* Look at File(); | |
* Look at Pthreads proper multithreading | |
* What are co-routines again? | |
* ZTS Zend Thread Safety | |
* Performance: | |
- Measure TTFB |
OlderNewer