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
class ColorPrinter: | |
""" | |
Usage: | |
cprint = ColorPrinter() | |
cprint.cfg('c','m','bux').out('Hello','World!') | |
cprint.rst().out('Bye now...') | |
See: http://stackoverflow.com/a/21786287/472610 | |
See: https://en.wikipedia.org/wiki/ANSI_escape_code | |
""" |
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 | |
/** | |
* This file can be used to validate that the WordPress wp_mail() function is working. | |
* To use, change the email address in $to below, save, and upload to your WP root. | |
* Then browse to the file in your browser. | |
* | |
* For full discussion and instructions, see the associated post here: | |
* http://b.utler.co/9L | |
* | |
* Author: Chad Butler |
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 | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
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 | |
namespace Acme\Bundle\OAuthBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\OutputInterface; |
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 | |
define('DIR_COMP', '<path>'); | |
$objects = new RecursiveIteratorIterator( | |
new RecursiveRegexIterator( | |
new RecursiveDirectoryIterator(DIR_COMP), | |
'/^(?!.*(\.svn|\.cvs)).*$/', | |
RecursiveRegexIterator::MATCH | |
), | |
RecursiveIteratorIterator::SELF_FIRST |
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 | |
/* | |
* Iteration and Recursive Iteration Examples Code | |
* | |
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php | |
* @author hakre <http://hakre.wordpress.com> | |
*/ | |
### To have these examples to work, a directory with subdirectories is needed, | |
### I named mine "tree": |
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
<?xml version="1.0"?> | |
<project name="Hello World Example" default="build" description="This is an example buildfile for Phing."> | |
<target name="prepare"> | |
<delete dir="reports"/> | |
<mkdir dir="reports/coverage"/> | |
</target> | |
<target name="build" depends="prepare"> | |
<coverage-setup database="reports/coverage.db"> |
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
-- PostgreSQL cheat sheet | |
--postgres is set up to use local.6 which is syslog'd to sflog001 | |
--slow query log is /var/log/localmessages | |
--config files are always in /data/friend/*.conf | |
--vacuums are set via cfengine, we use both manual and auto. vacuums/analyze help with frozen id's being recouped, and thus TX'id's not going over 2b thus causing massing shutdown/reset. Fix it to exp/imp high TX tables. | |
--to log into psql: psql -U postgres -d <DB> (usually friend) |