This file contains hidden or 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
/* Re-creating Bref style with CSS3 animation */ | |
html, body { margin:0 auto; padding:0; color:#fff; background-color:#444; font-size:18px; line-height:1.5; font-family:Trocchi, Serif; text-align:center; } | |
body { padding-top:100px; } | |
a { color:rgb(252, 96, 0); transition:all .3s linear; } | |
a:hover { color:rgb(232, 199, 69); } | |
ul { margin:0 auto; padding:0; list-style:none; clear:both; overflow:hidden; width:100%; } | |
.wrapper { margin:0 auto 40px; width:400px; padding:0; position:relative; transform:scale(2); } |
This file contains hidden or 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
/** | |
* Gradient Progress bar | |
*/ | |
html, body { background-color:#fff; color:#222; text-align:center; } | |
[class^=loading-] { box-sizing:border-box; margin:1em auto; width:300px; height:20px; } | |
.loading-outer { overflow:hidden; border-radius:.3em; background-color:#f1f1f1; box-shadow:inset 0 0 2px rgba(128, 128, 128, .3); } | |
.loading-inner { | |
margin-top:0; margin-left:100%; | |
background-color:#0ebdf7; | |
background-image:linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%); |
This file contains hidden or 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
/** | |
* The Kitt Effect using Efficient CSS Animation | |
*/ | |
html, body { | |
font:normal 100%/1.5 sans-serif; | |
} | |
.kitt, | |
.kitt div, |
This file contains hidden or 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
/** | |
* The Kitt Effect using Efficient CSS Animation | |
*/ | |
html, body { | |
font:normal 100%/1.5 sans-serif; | |
} | |
.kitt, | |
.kitt div, |
This file contains hidden or 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 | |
//Datetime and related Date time function will be base on UTC Timezone | |
date_default_timezone_set('UTC'); | |
$path = '/path/to/rss/feed.xml'; | |
$max_age = '12 HOURS'; //cache time in HOURS | |
//1 - File Status | |
$file = new SplFileObject($path); | |
$create_file = true; |
This file contains hidden or 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 Toto | |
{ | |
private $foo; | |
public function __construct($foo) | |
{ | |
$this->setFoo($foo); | |
} |
This file contains hidden or 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 | |
stream_filter_register("utf8encode", "Utf8EncodeFilter"); | |
class Utf8EncodeFilter extends php_user_filter | |
{ | |
function filter($in, $out, &$consumed, $closing) | |
{ | |
while ($bucket = stream_bucket_make_writeable($in)) { | |
$bucket->data = utf8_encode($bucket->data); | |
$consumed += $bucket->datalen; |
This file contains hidden or 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 | |
use League\Csv\Writer; | |
require 'vendor/autoload.php'; | |
function generateRandomString($length = 10) | |
{ | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$str = ''; |
This file contains hidden or 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 | |
header('Content-Type: text/html; charset=utf-8'); | |
function getRelativePath($path, $reference) | |
{ | |
//normalisation des parametres | |
$path = (string) $path; | |
if ('/' == $path[0]) { | |
$path = substr($path, 1); |
This file contains hidden or 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 | |
namespace CacheLib; | |
use DateTime; | |
use DateTimeInterface; | |
use DateTimeInterval; | |
use Psr\Cache\CacheItemInterface | |
class CacheItem implements CacheItemInterface |
OlderNewer