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
// App / app HTTP | commands | console | events | |
/ Http | |
/ Commands | |
/ Messages | |
/ MessageNewHttpCommand.php | |
/ Events | |
/ Messages | |
/ MessageWasCreatedEvent.php |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PackerSecurityGroupAccess", | |
"Action": [ | |
"ec2:CreateSecurityGroup", | |
"ec2:DeleteSecurityGroup", | |
"ec2:DescribeSecurityGroups", | |
"ec2:AuthorizeSecurityGroupIngress", |
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 | |
if ( ! function_exists('config_path')) | |
{ | |
/** | |
* Get the configuration path. | |
* | |
* @param string $path | |
* @return string | |
*/ |
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 | |
class ArrUtils | |
{ | |
/** | |
* @param $searchKey | |
* @param $dataArray | |
* @return boolean | |
*/ | |
protected function isKeyInArray($searchKey, $dataArray) | |
{ |
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 | |
class Helper | |
{ | |
/** | |
* Finds all mustache template tokens ex: | |
* {{> components/templates/email/includes/email-tr-spacer-thin }} | |
* {{# deliveryAddress }} | |
* {{^ deliveryAddress }} | |
* {{{ deliveryAddressReadable }}} | |
* {{ deliveryAddressReadable }} |
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 | |
/** | |
* Link to original answer http://stackoverflow.com/a/10424516/461712 by http://stackoverflow.com/users/249538/goat | |
*/ | |
class ArrUtils { | |
/** | |
* @param $array | |
* @return array |
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
{ | |
"status": 200, | |
"data": { | |
"km_per_liter": 10.79, | |
"liters_per_hundred_km": 9.27, | |
"total_trip_km": 355 | |
} | |
} |
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 | |
/* | |
* Gets the rows from a csv file in laravel. via https://github.com/johnmarkmassey :+1: | |
*/ | |
$rows = array_map('str_getcsv', file(app_path('database/migrations/test_data.csv'))); | |
var_dump($rows); |
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
COMPOSER_TIMEOUT=600 php -d memory_limit=2G path/to/composer.phar $@ |
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
sudo su | |
tar cf - <folder> -P | pv -s $(du -sb <folder> | awk '{print $1}') | gzip > data.tar.gz | |
# Outputs something like this | |
# 3.06GiB 0:03:01 [15.8MiB/s] [========> ] 5% ETA 0:57:05 | |
# | |
# I recently needed to perform a data recovery on a bad migration where I deleted the wrong stuff. I tried to recover data | |
# from a mysql 5.5 dump to a mysql 5.7 ubuntu 16.04 google cloud box and even though I could edit the data and fix the deleted | |
# rows in the tables, I coulnd't export it well enough since incompatibilities between 5.5 and 5.7 :( |
OlderNewer