Skip to content

Instantly share code, notes, and snippets.

@blar
blar / docker-compose.yml
Created August 9, 2022 22:35
rancher server 1.7.5
# Services to upgrade after start:
#
# healthcheck:
# healthcheck: foobox/rancher-healthcheck:0.4.0
# ipsec:
# cni-driver: foobox/rancher-net:0.14.0
# network-services:
# metadata: foobox/rancher-metadata:0.11.0
# dns: foobox/rancher-dns:0.18.0
# scheduler:
@blar
blar / Dockerfile
Created October 5, 2021 18:14
Rancher 1.6 Server: Upgrade agent image
FROM rancher/server:v1.6.30
RUN mkdir -p /var/lib/cattle/etc/cattle/ && \
echo -e "\nbootstrap.required.image=rancher/agent:v1.2.11-fixed" >> /var/lib/cattle/etc/cattle/cattle.properties
<?php
class Request {
}
class Response {
public $body = '';
<?php
if (!function_exists('image_affine_matrix_concat')) {
function image_affine_matrix_concat()
{
return call_user_func_array('imageaffinematrixconcat', func_get_args());
}
}
if (!function_exists('image_affine_matrix_get')) {
<?php
if (!function_exists('imageaffinematrixconcat')) {
function imageaffinematrixconcat()
{
return call_user_func_array('image_affine_matrix_concat', func_get_args());
}
}
if (!function_exists('imageaffinematrixget')) {
@blar
blar / csv.php
Created September 19, 2017 13:42
<?php
$file = fopen('test.csv', 'r');
$headers = $data = fgetcsv($file, 1000, ',');
while($values = fgetcsv($file, 1000, ',')) {
$entry = array_combine($headers, $values);
}
fclose($file);
<?php
function isValidFile($file) {
if($file == ".") {
return false;
}
if($file == "..") {
return false;
}
if($file == "index.php") {
BEGIN:VCALENDAR
VERSION:2.0
PRODID:icalendar-ruby
CALSCALE:GREGORIAN
X-WR-CALNAME:Deutsche Feiertage
X-APPLE-LANGUAGE:de
X-APPLE-REGION:DE
BEGIN:VEVENT
DTSTAMP:20140522T185135Z
UID:d96b8130-171f-343c-8fce-1612783984df
<?php
namespace TYPO3\CMS\CssStyledContent\Controller;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
/**
@blar
blar / realpath2.php
Created January 25, 2016 20:30
realpath mit strict_types
<?php
declare(strict_types = 1);
$path = 'foobar';
var_dump($path);
$path = realpath($path);
var_dump($path);