Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@samdark
samdark / github-post-receive.php
Last active October 11, 2019 10:05
Simple GitHub post-receive PHP hook
<?php
function cidr_match($ip, $ranges)
{
$ranges = (array)$ranges;
foreach($ranges as $range) {
list($subnet, $mask) = explode('/', $range);
if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) {
return true;
}
}
@smichaelsen
smichaelsen / VersionedTypo3DbBackend.php
Created December 6, 2012 11:41
Extbase Storage Backend that writes the changes to sys_history and sys_log
<?php
class Tx_OrderTracker_Persistence_Storage_VersionedTypo3DbBackend extends Tx_Extbase_Persistence_Storage_Typo3DbBackend {
/**
* @var t3lib_TCEmain
* @inject
*/
protected $tcemain;
@ohader
ohader / forge-analyse.php
Last active December 10, 2015 11:38
Forge Issue Analysis
<?php
/**
* Usage:
* php forge-analyse.php <date-from> [<date-until>]
* php forge-analyse.php 2012-12-24 2012-12-31
*
* @author Oliver Hader <oliver.hader@typo3.org>
* @license GPL v2 or any later version
* @see http://forge.typo3.org/projects/typo3v4-core/wiki/FriendlyGhost
*/
@fhemberger
fhemberger / backup-uberspace.exclude
Created October 17, 2013 08:52
How to easily backup your Uberspace (http://uberspace.de) account with rsync
.gem
.npm
cgi-bin
fcgi-bin
html
lib
man
share
tmp
**/node_modules
@maddy2101
maddy2101 / gist:776ca1c15074129de883
Last active October 27, 2017 08:56
Speckkuchen Rezept
hier wie versprochen mein Rezept:
500g Weizenmehl,
50g Margarine
1 Teeloeffel Salz
250ml Milch
1 Ei
1 Wuerfel frische Hefe
Mehl in eine Schuessel sieben, in die Mitte ein Kuhle druecken. Milch
@smichaelsen
smichaelsen / DateInterval.php
Last active November 26, 2015 09:19
Example how to use the TypeInterface to let extbase initialize objects from your database records
<?php
namespace AppZap\MyExt\Type;
use TYPO3\CMS\Core\Type\TypeInterface;
/**
* In our application we have fields that store time intervals as minutes in the database.
* In our code we want proper DateInterval objects, so we use a TypeInterface to let extbase take care of the conversion.
*
* Usage example on a model property:
@spoonerWeb
spoonerWeb / .gitlab-ci.yml
Last active March 15, 2024 08:15
GitLab CI for building and deploying TYPO3 websites with deployer
cache:
paths:
- /cache/composer
stages:
- composer
- deploy
build:
stage: composer
@froemken
froemken / docker-compose.override.yaml
Last active August 8, 2022 15:00
How to exclude typo3temp directory from ddev to get more performance
# Move typo3temp into RAM-Disk. Do not sync vendor and TYPO3-Directory.
# For MAC: 'nocopy' will only work correct, if nfs_mount_enabled is true
version: '3.6'
services:
web:
volumes:
- type: tmpfs
tmpfs:
size: 268435456
# TYPO3 8
<?php
declare(strict_types=1);
namespace Vendor\Sitepackage\DataProcessing;
use Doctrine\DBAL\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;