For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| <?php | |
| /* | |
| Credit Card Validator | |
| Date - Sep 04, 2009 | |
| Author - Brent Shaffer | |
| ABOUT |
| <?php | |
| class Tx_MyExt_Controller_BaseController extends Tx_Extbase_MVC_Controller_ActionController { | |
| /** | |
| * @see Tx_Extbase_MVC_Controller_ActionController::callActionMethod() | |
| */ | |
| protected function callActionMethod() { | |
| $this->validateAll(); | |
| parent::callActionMethod(); |
| ; Spawn fcgiwrap as the user owning the git repositories, with a socket writeable by nginx | |
| [fcgi-program:fcgiwrap_gitolite] | |
| command = /usr/sbin/fcgiwrap | |
| user = gitolite | |
| socket = unix:///var/run/supervisor/%(program_name)s.sock | |
| socket_owner = gitolite:nginx | |
| socket_mode = 0770 |
| <?php | |
| function is_valid_luhn($number) { | |
| settype($number, 'string'); | |
| $sumTable = array( | |
| array(0,1,2,3,4,5,6,7,8,9), | |
| array(0,2,4,6,8,1,3,5,7,9)); | |
| $sum = 0; | |
| $flip = 0; | |
| for ($i = strlen($number) - 1; $i >= 0; $i--) { | |
| $sum += $sumTable[$flip++ & 0x1][$number[$i]]; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/bin/bash | |
| # Script for placing sudoers.d files with syntax-checking | |
| # Making a temporary file to contain the sudoers-changes to be pre-checked | |
| TMP=$(mktemp -t vagrant_sudoers) | |
| cat /etc/sudoers > $TMP | |
| cat >> $TMP <<EOF | |
| # Allow passwordless startup of Vagrant when using NFS. | |
| Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports |
| This playbook has been removed as it is now very outdated. |
| <?php | |
| namespace FashionWeb\DynamicRoutingBundle\DependencyInjection; | |
| use Symfony\Component\Config\Definition\Builder\TreeBuilder; | |
| use Symfony\Component\Config\Definition\ConfigurationInterface; | |
| use Symfony\Component\Config\Definition\Builder\NodeDefinition; | |
| /** | |
| * This is the class that validates and merges configuration from your app/config files |
readlink.sh is a pure shell implementation that uses dirname, basename, readlink and pwd utils.
Note that you cannot rename it to just readlink as then the script will call itself instead of the system utility.
realpath script simply calls Python's os.path.realpath.
Python is provided in OS X and major Linux distributions.
You can use instead of the system utility by making a symlink: ln -s realpath readlink.
Another way is to install coreutils package via Homebrew or MacPorts and use greadlink.
The code is taken from the following page on StackOverflow: http://goo.gl/Yw9OY