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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnb6T46gMch9TgMXUO7e9RweEtSEsAAzbQePTQBVGVgOxBFk44YTLSWvAtWCWlkFXUFU3DCmlFzKxSoBKA3nsdOffT2sfKBiIG41cB0LPpy4xAkK6qHFI/8ZTGr4Q1FQqx8IW9PW+uHocz2WcLsh2I2e2mREZoVAG8YoiXorc4bhcRNRIr0fjiec1N+ruS2axhPHIWqMf+o3FfoDvMc4QCBctNz1IiJZTq8EHONWMSV7heq5Vg6oOzuk7zKB+xcEUqRKRtYHwvoOlWrTLy1mZdburJnso4qPJkgmfZQ+5QWLpD2ChenUSZSlDFd3W5ssJGOS9dPW659fvGPvagJujD [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ $# -eq 0 ] || [ $# -eq 1 ] || [ $# -eq 2 ] | |
then | |
echo "usage : mysql_backup.sh user passw backup destination" | |
exit 1 | |
fi | |
umask 007 |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
NewerOlder