Skip to content

Instantly share code, notes, and snippets.

@doctaphred
doctaphred / ntfs-filenames.txt
Last active May 9, 2024 13:27
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)
@Keoghan
Keoghan / ExpiringScope.php
Created November 11, 2015 23:48
Global Scope for use with the ExpiresTrait. Deals with removing bindings from nested where clauses from the global query when removing.
<?php
namespace Whitebox\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ScopeInterface;
use Illuminate\Database\Query\Builder as QueryBuilder;
@Keoghan
Keoghan / Expires.php
Created November 11, 2015 23:47
A simple Expires trait for use in a laravel app on an Eloquent model. Requires ExpiringScope
<?php
namespace App;
use Carbon\Carbon;
trait Expires
{
public static function bootExpires()
{
@proweb
proweb / index.php
Created January 25, 2013 14:00
HTML 5 Joomla head override - Переписываем вывод HEAD для Joomla 2.5 в соответствии со стандартами HTML5
<?php
// no direct access
defined('_JEXEC') or die;
// Variables
$doc = JFactory::getDocument();
$user = JFactory::getUser();
$template = 'templates/' . $this->template;
// get html head data