I hereby claim:
- I am caffe1neadd1ct on github.
- I am kjandrews (https://keybase.io/kjandrews) on keybase.
- I have a public key ASBi_zg2m4D4mGNz9f-S63C40dEnZx2X5ITMFidPtxFuWgo
To claim this, I am signing this object:
## Install packages | |
sudo yum install wget curl vim epel-release | |
sudo yum install daemonize.x86_64 | |
## Install mailhog | |
wget https://github.com/mailhog/MailHog/releases/download/v0.2.0/MailHog_linux_amd64 | |
sudo chmod +x MailHog_linux_amd64 | |
sudo chown root:root MailHog_linux_amd64 | |
sudo mv MailHog_linux_amd64 /usr/sbin/mailhog |
sudo su root -l | |
yum install centos-release-scl | |
yum install php54.x86_64 php54-build.x86_64 php54-php.x86_64 php54-php-bcmath.x86_64 php54-php-cli.x86_64 php54-php-common.x86_64 php54-php-dba.x86_64 php54-php-devel.x86_64 php54-php-enchant.x86_64 php54-php-fpm.x86_64 php54-php-gd.x86_64 php54-php-imap.x86_64 php54-php-intl.x86_64 php54-php-ldap.x86_64 php54-php-mbstring.x86_64 php54-php-mysqlnd.x86_64 php54-php-odbc.x86_64 php54-php-pdo.x86_64 php54-php-pear.noarch php54-php-pecl-apc.x86_64 php54-php-pecl-zendopcache.x86_64 php54-php-pgsql.x86_64 php54-php-process.x86_64 php54-php-pspell.x86_64 php54-php-recode.x86_64 php54-php-snmp.x86_64 php54-php-soap.x86_64 php54-php-tidy.x86_64 php54-php-xml.x86_64 php54-php-xmlrpc.x86_64 | |
echo "source /opt/rh/php54/enable" >> /etc/bashrc | |
source /opt/rh/php54/enable | |
## Install suhosin | |
wget -nv -O suhosin.zip https://github.com/stefanesser/suhosin/archive/0.9.37.1.zip | |
unzip -q suhosin.zip |
<?php | |
namespace Ext; | |
/** | |
* Extension to Phalcon Framework to implement Bootstrap 3 dismissable messages. | |
* Pass mappings of phalcon to bootstrap classes to construct | |
* @link https://docs.phalconphp.com/uk/latest/reference/flash.html Phalcon flash docs | |
* @author Kevin Andrews <[email protected]> | |
*/ |
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="my-project-name" default="bundle" basedir="." description="Build file for my-project-name."> | |
<property name="export.dir" value="build/export" /> | |
<autoloader autoloaderpath="vendor/autoload.php"/> | |
<fileset dir="app/tmp/" id="tmp"> | |
<include name="**" /> | |
<exclude name="**/.gitkeep" /> | |
<exclude name=".gitkeep" /> |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.4.11 on 2017-02-14. | |
* | |
* @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"); |
I hereby claim:
To claim this, I am signing this object:
<VirtualHost *:80> | |
ServerName domain.tld | |
ServerAdmin [email protected] | |
DocumentRoot "/var/www/html/domain.tld/" | |
<Directory "/var/www/html/domain.tld/"> | |
Options +Indexes +FollowSymLinks +MultiViews | |
AllowOverride All |
def parse_size_to_bytes(size): | |
""" | |
Convert Human Readable Sizes to Bytes | |
https://gist.github.com/Caffe1neAdd1ct/2b8f1a51c39e471119663c93f24d33fe | |
:param size: String representing size in a human readable format | |
:return: | |
""" | |
units = 'bkmgtpezy' | |
unit_index = -1 |
<?php | |
function parseSize($size) | |
{ | |
$unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size. | |
$size = preg_replace('/[^0-9\.]/', '', $size); // Remove the non-numeric characters from the size. | |
if ($unit) { | |
// Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by. | |
return $bytesSize = $size * pow(1024, stripos('bkmgtpezy', $unit[0])); | |
} |
CREATE OR REPLACE FUNCTION setval_max | |
( | |
schema_name name, | |
table_name name DEFAULT NULL::name, | |
raise_notice boolean DEFAULT false | |
) | |
RETURNS void AS | |
$BODY$ | |
-- Sets all the sequences in the schema "schema_name" to the max(id) of every table (or a specific table, if name is supplied) |