Skip to content

Instantly share code, notes, and snippets.

View schuhwerk's full-sized avatar

Vitus Schuhwerk schuhwerk

View GitHub Profile
@schuhwerk
schuhwerk / setcookie_samesite_polyfill.php
Last active October 15, 2021 15:04 — forked from bohwaz/setcookie_samesite_polyfill.php
PHP setcookie function polyfill with support for SameSite attribute (compatible with PHP 5.0+)
<?php
/**
* Setcookie function with support for SameSite
* @param string|null $samesite 'Lax' or 'Strict'
*/
function setcookie_samesite( $name, $value = '', $expire = 0, $path = null, $domain = null, $secure = false, $httponly = false, $samesite = null)
{
$header = 'Set-Cookie: '.rawurlencode($name) . '=' . rawurlencode($value).';';
$header .= $expire ? sprintf('expires=%s', gmdate('D, d M Y H:i:s \G\M\T', $expire)).'; ' : '';
@schuhwerk
schuhwerk / font-awesome-4.7.0.json
Last active January 12, 2022 22:22 — forked from zwinnie/font-awesome-4.7.0.json
JSON Of Font Awesome 4.7.0 Icons (That don't collide with UI-Elements)
{
"4.7.0": [
"fa-500px",
"fa-address-book",
"fa-address-book-o",
"fa-address-card",
"fa-address-card-o",
"fa-adjust",
"fa-adn",
"fa-align-center",