Skip to content

Instantly share code, notes, and snippets.

Wear a mask

Dan Untenzu pixelbrackets

Wear a mask
View GitHub Profile
pixelbrackets /
Last active Feb 10, 2022
Composer Test Dev Depdendency

ACME DevTool

A package intended for usage during development


pixelbrackets / main.yaml
Created Feb 1, 2022
php-version-pickup Ansible Role
View main.yaml
- name: Download/Update php-version-pickup
dest: /home/{{ username }}/.php-version-pickup
clone: yes
update: yes
- name: Source script
pixelbrackets / composer.json
Last active Feb 10, 2022
View composer.json
"name": "pixelbrackes/php-version-pickup",
"description": "Set a PHP version used in a shell session through a `.php-version` file",
"type": "project",
"license": "GPL-2.0-or-later"
pixelbrackets / php-password-hash
Created Sep 7, 2021
PHP Password Hash Creator
View php-password-hash
#!/usr/bin/env php
echo 'Password: ' . PHP_EOL;
fscanf(STDIN, '%s', $password);
$passwordHash = password_hash($password, PASSWORD_ARGON2I);
echo 'Hash: ' . PHP_EOL;
echo $passwordHash . PHP_EOL;
$result = password_verify($password, $passwordHash);
pixelbrackets /
Last active Feb 10, 2022
Pass a specific PHP version to subscripts in a CLI call

Pass a specific PHP version to subscripts in a CLI call


Using the PPA ondrej/php it is possible to run multiple PHP version on one system.

All single versions are useable on the CLI, e.g. php7.4 --version. The command php will point to the default version.


pixelbrackets /
Last active Oct 15, 2021
Manage GitHub & GitLab Credentials in Composer
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>
// 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 / 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
// composer require guzzlehttp/guzzle
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['timeout' => 2]);
$urls = [
pixelbrackets / .gitlab-ci.yml
Created Dec 2, 2020
Minimal GitLab CI file to test a pipeline setup
View .gitlab-ci.yml
script: 'echo Hello GitLab CI'
pixelbrackets / ci-minimal-smoketest.yml
Created Dec 1, 2020
CI minimal smoketest with cURL
View ci-minimal-smoketest.yml
stage: test
- curl -s --fail --show-error