Skip to content

Instantly share code, notes, and snippets.

View Thijzer's full-sized avatar
😃

Thijs De Paepe Thijzer

😃
View GitHub Profile
@Thijzer
Thijzer / induxx_internal_public_key.id_rsa.pub
Last active April 23, 2021 12:43
induxx_internal_public_key.id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnb6T46gMch9TgMXUO7e9RweEtSEsAAzbQePTQBVGVgOxBFk44YTLSWvAtWCWlkFXUFU3DCmlFzKxSoBKA3nsdOffT2sfKBiIG41cB0LPpy4xAkK6qHFI/8ZTGr4Q1FQqx8IW9PW+uHocz2WcLsh2I2e2mREZoVAG8YoiXorc4bhcRNRIr0fjiec1N+ruS2axhPHIWqMf+o3FfoDvMc4QCBctNz1IiJZTq8EHONWMSV7heq5Vg6oOzuk7zKB+xcEUqRKRtYHwvoOlWrTLy1mZdburJnso4qPJkgmfZQ+5QWLpD2ChenUSZSlDFd3W5ssJGOS9dPW659fvGPvagJujD info@induxx.be

wkhtmltox_0.12.5-1 amd64

Ubuntu 16.04

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.xenial_amd64.deb
sudo apt -f install
@Thijzer
Thijzer / gist:8b0485476982c15cce4f53273be3ae86
Last active April 22, 2018 14:22
Arch install guide For Proxmox VM
loadkeys be-latin1
fdisk /dev/sda
# setup sda1 as a single partition
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt
pacstrap /mnt base
# grub instead of bootctl becauce bootctl doesn't support BIOS
pacman -S grub intel-ucode openssh
grub-install --target=i386-pc /dev/sdX
grub-mkconfig -o /boot/grub/grub.cfg
<?php
function echoProgressBar(int $totalAmount, int $progress, int $parts = 100)
{
if ($totalAmount === $progress) {
echo sprintf("[%s] %s %s %%", str_repeat('#', $parts), $progress, 100);
return;
}
$quota = 100 / $parts;
<?php
# /usr/local/bin/speedtest-cli
exec('/usr/bin/speedtest-cli --simple', $output);
$replacers = ["Ping:", "ms", "Download:", "Upload:", "Mbit/s"];
// convert to useful array
$json['value1'] = trim(str_replace($replacers, '', $output[0]));
$json['value2'] = trim(str_replace($replacers, '', $output[1]));
$json['value3'] = trim(str_replace($replacers, '', $output[2]));
$key = '';
$event = '';
#! /bin/bash
if [ $# -eq 0 ] || [ $# -eq 1 ] || [ $# -eq 2 ]
then
echo "usage : mysql_backup.sh user passw backup destination"
exit 1
fi
umask 007

Keybase proof

I hereby claim:

  • I am thijzer on github.
  • I am thijzer (https://keybase.io/thijzer) on keybase.
  • I have a public key ASAifp1j4uAgOdxm_kL40DDA812ZwidgRXZLKMSevdD9PQo

To claim this, I am signing this object:

function generateCallTrace()
{
$e = new \Exception();
$trace = explode("\n", $e->getTraceAsString());
// reverse array to make steps line up chronologically
$trace = array_reverse($trace);
array_shift($trace); // remove {main}
array_pop($trace); // remove call to this method
$length = count($trace);
$result = array();
@Thijzer
Thijzer / .switch_php_version
Created December 16, 2015 14:47
.files php version switcher
#!/bin/bash
if [ $# -ne 1 ]; then
        echo "Usage: sphp [phpversion]"
        exit 1
fi
currentversion="`php -r \"echo str_replace('.', '', substr(phpversion(), 0, 3));\"`"
newversion="$1"
@Thijzer
Thijzer / cookieBanner.tpl
Created November 6, 2015 08:24
ForkCms cookieBanner
<div class="fullWidthAlert alert" id="cookie-banner" style="display: none;">
<p>{$msgCookieDisclaimer}</p>
<a id="cookie-banner-ok-btn" href="#">{$lblCookieAgree}</a>
</div>
<style>
#cookie-banner {
padding: 8px 15px;
background-color: #fcf8e3;
width: 100%;