Skip to content

Instantly share code, notes, and snippets.

View pixelbrackets's full-sized avatar
🧑‍🎓
Looking at other things right now

Dan Kleine (geb. Dan Untenzu) pixelbrackets

🧑‍🎓
Looking at other things right now
View GitHub Profile
@pixelbrackets
pixelbrackets / guzzle-json-request.php
Last active May 15, 2020 15:21
Guzzle JSON Request Debugging
<?php
// composer require guzzlehttp/guzzle
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require __DIR__ . '/vendor/autoload.php';
@pixelbrackets
pixelbrackets / git-mirror-repository.sh
Last active August 28, 2020 12:51
Duplicate / Mirror a git repository to another without forking
#!/usr/bin/env bash
# Usage:
# ./git-mirror-repository.sh "<source repository URL>" "<target repository URL>"
# Example:
# ./mirror-gitlos-project.sh "git@gitlab.com:example/kickstart.git" "git@gitlab.com:example/acme.git"
#
# The user must have access to both existing repositories
#
# Warning! --mirror will do a force push - Use only once per project!
@pixelbrackets
pixelbrackets / .htaccess
Last active September 2, 2020 09:42
Route all requests to index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
@pixelbrackets
pixelbrackets / index.php
Last active September 2, 2020 10:33
slim-example-api
<?php
require __DIR__ . '/../vendor/autoload.php';
/**
* Slim: https://packagist.org/packages/slim/slim
* Slim PSR7 implementation https://packagist.org/packages/slim/psr7
* Slim PSR-7 object decorators https://packagist.org/packages/slim/http
*
* Examples calls:
@pixelbrackets
pixelbrackets / index.php
Last active September 2, 2020 12:46
waterpipe-example-api
<?php
require __DIR__ . '/../vendor/autoload.php';
/**
* Waterpipe: https://packagist.org/packages/elementaryframework/water-pipe
*
* Examples calls:
* http 127.0.0.1:8080/ # GET homepage
* http 127.0.0.1:8080/build/ token=foo # POST JSON Build endpoint
@pixelbrackets
pixelbrackets / page.typoscript
Last active October 8, 2020 08:51
TypoScript Template Render Fix - Hotfix if some TYPO3 plugins render unwanted HTML and you need a way to replace this without changing the plugin
# page = PAGE
# page.10 = FLUIDTEMPLATE
# page.10 {
# # TYPO3 page template and all content rendered here, containing some unwanted markup
# }
### Template Render Fix
page.10 {
stdWrap.replacement {
### Replace legacy Values
@pixelbrackets
pixelbrackets / img.html
Created November 10, 2020 12:59 — forked from joseluisq/img.html
Render an image placeholder using a simple Data URI.
<img alt="64x64" width="64" height="64" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==">
@pixelbrackets
pixelbrackets / gfm.css
Last active November 15, 2020 13:18
GitHub Flavored Markdown Stylesheet - Version of the »sindresorhus/github-markdown-css« stylesheet with a body style and without the ».markdown-body« prefix
/**
* GitHub Flavored Markdown Stylesheet
*
* MIT License
* Dan Untenzu - @pixelbrackets (https://pixelbrackets.de)
*/
/**
* tuzz/github.css body styles
* Source https://gist.github.com/tuzz/3331384 (MIT), version 8
@pixelbrackets
pixelbrackets / commit-message.txt
Created November 25, 2020 17:03
Patchbot Patch »template« - Just a patch template without any changes
Summary of the changes in 50 characters or less
Explain the problem that this commit is solving. Written in imperative mood.
That means that it must be written as if you are giving a command
or an instruction, since a commit is a set of instructions for how to go
from a previous state to the new state.
The commit message should describe this process.
@pixelbrackets
pixelbrackets / commit-message.txt
Created November 25, 2020 17:05
Patchbot Patch »search-and-replace« - Search and replace a string within a README
Replace Sandbox Title
Add a more verbose title