Skip to content

Instantly share code, notes, and snippets.

Avatar
😷
Wear a mask

Dan Untenzu pixelbrackets

😷
Wear a mask
View GitHub Profile
@pixelbrackets
pixelbrackets / date-prototype.html
Created Feb 25, 2021
Date Formats (2017-02-21)
View date-prototype.html
Valid till: <span class="datetime" data-datetime="2017-02-21 17:00">2017-02-21 17:00 (GMT)</span>
<script>
// Given: Date and time in UTC timezone and international format
// Returned: Date and time in local timezone and international format
// Note: Returning localised date formats is not possible in JavaScript
// without the help of a library like moment.js!
// Extend date object with format method
@pixelbrackets
pixelbrackets / test-firewall.php
Created Feb 25, 2021
Test Firewall - Minimal script to prove to hosters that access to certain domains is not possible
View test-firewall.php
<?php
// composer require guzzlehttp/guzzle
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['timeout' => 2]);
$urls = [
@pixelbrackets
pixelbrackets / .gitlab-ci.yml
Created Dec 2, 2020
Minimal GitLab CI file to test a pipeline setup
View .gitlab-ci.yml
job1:
script: 'echo Hello GitLab CI'
@pixelbrackets
pixelbrackets / ci-minimal-smoketest.yml
Created Dec 1, 2020
CI minimal smoketest with cURL
View ci-minimal-smoketest.yml
job_test_app_smoketest:
stage: test
script:
- curl -s --fail --show-error https://example.com/
@pixelbrackets
pixelbrackets / .editorconfig
Created Nov 25, 2020
Patchbot Patch »add-editorconfig« - Add EditorConfig file to maintain consistent code styles
View .editorconfig
# Configuration to unify coding styles in IDEs - See https://EditorConfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
@pixelbrackets
pixelbrackets / commit-message.txt
Created Nov 25, 2020
Patchbot Patch »search-and-replace« - Search and replace a string within a README
View commit-message.txt
Replace Sandbox Title
Add a more verbose title
@pixelbrackets
pixelbrackets / commit-message.txt
Created Nov 25, 2020
Patchbot Patch »template« - Just a patch template without any changes
View commit-message.txt
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 / gfm.css
Last active Nov 15, 2020
GitHub Flavored Markdown Stylesheet - Version of the »sindresorhus/github-markdown-css« stylesheet with a body style and without the ».markdown-body« prefix
View gfm.css
/**
* 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 / img.html
Created Nov 10, 2020 — forked from joseluisq/img.html
Render an image placeholder using a simple Data URI.
View img.html
<img alt="64x64" width="64" height="64" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==">
@pixelbrackets
pixelbrackets / page.typoscript
Last active Oct 8, 2020
TypoScript Template Render Fix - Hotfix if some TYPO3 plugins render unwanted HTML and you need a way to replace this without changing the plugin
View page.typoscript
# 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