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 | |
declare(strict_types=1); | |
namespace Database\Helpers; | |
use Illuminate\Support\Facades\Schema; | |
class Column | |
{ |
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 | |
declare(strict_types=1); | |
namespace Database\Helpers; | |
use Illuminate\Support\Facades\Schema; | |
class ForeignKey | |
{ |
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
/** | |
* writes and saves xml file with given data | |
* @param array $data | |
* @param array $order | |
*/ | |
private function writeXmlFile($data, $orderArray){ | |
$today = date_format( new \DateTime(), 'Y-m-d\TH:i:s'); //2018-07-25T11:20:12 | |
$orderNr = 'gbp'.date_format(new \DateTime(), 'y\TH:i:s'); | |
$xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><orders/>'); |
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
/** | |
* Using jQuery to Detect When CSS3 Animations and Transitions End | |
* @see https://blog.teamtreehouse.com/using-jquery-to-detect-when-css3-animations-and-transitions-end | |
*/ | |
jQuery(document).ready(function($) { | |
'use strict'; | |
const myButton = $('.my-button'), |
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
$file = fopen($file_on_dir_not_url, "rb"); | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2); | |
curl_setopt($curl, CURLOPT_HEADER, false); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true); | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_PUT, true); |
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
/* | |
* License: DWTFYW | |
*/ | |
/** | |
* Search recusively for files in a base directory matching a glob pattern. | |
* The `GLOB_NOCHECK` flag has no effect. | |
* | |
* @param string $base Directory to search | |
* @param string $pattern Glob pattern to match files |
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 | |
/** | |
* $pos = get cut position based on fixed position ($fixed), | |
* but without break last word | |
*/ | |
$text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."; | |
$excerpt = ''; | |
$fixed = 25; |