This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
<IfModule mod_fastcgi.c> | |
AddType application/x-httpd-fastphp5 .php | |
Action application/x-httpd-fastphp5 /php5-fcgi | |
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi | |
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization | |
<Directory /usr/lib/cgi-bin> | |
Require all granted | |
</Directory> | |
</IfModule> |
<div className="d-flex w-100 justify-content-between"> | |
<span>{order.id} - {order.size_description}</span> | |
<small>{order.total_qty} labels</small> | |
<small>{order.design_qty} designs</small> | |
{((order) => { | |
if(order.is_shipping_blind){ | |
return ( | |
<span className="badge badge-warning">Shipping Blind</span> | |
) | |
} |
<?php | |
// Calling this model OtherItem | |
// in your model initialize function for your OtherItem | |
$this->addBehavior('CounterCache', [ | |
'PrimaryItems' => [ | |
'other_items_count' | |
] | |
]); | |
$this->hasMany('OtherItems', [ |
FROM httpd:2.4-alpine | |
COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf |
<?php | |
$pusher = new \Pusher( | |
env('PUSHER_AUTH_KEY', null), | |
env('PUSHER_APP_SECRET', null), | |
env('PUSHER_APP_ID', null), | |
$options | |
); | |
$data['message'] = 'Order ' . $order->id . ' was updated'; | |
$pusher->trigger('order', 'updated', $data); |
<?php | |
class BusinessDayPeriodIterator implements \Iterator | |
{ | |
private $current; | |
private $period = []; | |
public function __construct(\DatePeriod $period) { | |
$this->period = $period; | |
$this->current = $this->period->getStartDate(); | |
if(!$period->include_start_date){ |
<?php | |
class PeriodIterator implements \Iterator | |
{ | |
private $current; | |
private $period = []; | |
public function __construct(\DatePeriod $period) { | |
$this->period = $period; | |
$this->current = $this->period->getStartDate(); |
<?php | |
public function beforeMarshal(Event $event, \ArrayObject $data, \ArrayObject $options) | |
{ | |
$entityClass = $this->getEntityClass(); | |
$propertyMap = (new $entityClass())->_map; | |
foreach($propertyMap as $new => $old){ | |
if($data->offsetExists($new)){ | |
$data->offsetSet($old, $data->offsetGet($new)); | |
$data->offsetUnset($new); |
<?php | |
$shipmentPackagesResponses = $verifyShipment->getPackages(); | |
$shipmentPackages = $shipment->shipment_packages; | |
foreach($shipmentPackages as $key => &$shipmentPackage){ | |
$shipmentPackage = $shipmentPackage->toArray(); | |
$shipmentPackage['tracking_code'] = $shipmentPackagesResponses[$key]->getTrackingCode(); | |
} | |
$shipment = $this->Shipments->patchEntity($shipment, ['shipment_packages' => $shipmentPackages], [ | |
'associated' => ['ShipmentPackages'] |