Skip to content

Instantly share code, notes, and snippets.

View mmahgoub's full-sized avatar

Mohammed Mahgoub mmahgoub

View GitHub Profile
@mmahgoub
mmahgoub / gist:de1b3e55af54bbc3384da0bc8dbf127a
Created October 19, 2022 11:04
Remove passwords from multiple PDFs using qpdf
$ for file in ./**/*(.); do qpdf --decrypt --password=password-here $file ./unprotected/$file; done
@mmahgoub
mmahgoub / Vagrantfile-php7.2
Last active February 10, 2020 09:47 — forked from DragonBe/Vagrantfile-php7.2
A quick Vagrant file to get started with PHP 7.2
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = '2'
@script = <<SCRIPT
# Fix for https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1561250
if ! grep -q "ubuntu-xenial" /etc/hosts; then
echo "127.0.0.1 ubuntu-xenial" >> /etc/hosts
fi
@mmahgoub
mmahgoub / grid.css
Last active January 24, 2019 14:58
Grid column that fills available space depending on its contents
.box {
display: grid;
grid-template-columns: 1fr minmax(min-content, auto) 1fr;
}