Skip to content

Instantly share code, notes, and snippets.

@gliech
gliech / Seamly2D Vagrantfile
Last active April 26, 2020 14:08
How to compile Seamly2D on Fedora 31
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "jackrayner/fedora-31-workstation"
config.vm.provision "shell", inline: <<-EOF
#!/usr/bin/env bash
dnf --assumeyes --errorlevel=0 --nogpgcheck upgrade
dnf --assumeyes --errorlevel=0 --nogpgcheck groupinstall "C Development Tools and Libraries"
dnf --assumeyes --errorlevel=0 --nogpgcheck install git qt5-qtbase-devel qt5-qtxmlpatterns-devel qt5-linguist qt5-qtsvg-devel
@gliech
gliech / truthy_functions.sh
Last active December 14, 2018 09:35
Speed comparison of some common ways to check for truthy values in Bash and a snippet of my full implementation.
#!/usr/bin/env bash
# Preface:
# There is nothing wrong with using 'if [[ $VAR == yes ]]; then' for evaluating
# internal variables. The following is mainly intended for cases where you do
# not have full control over the variable in question, like user input or envi-
# ronment variables. I am of the belief however that no one should under any
# condition use something like this:
# | VAR=true
# | if $VAR; then
# | do_something
@gliech
gliech / Vagrantfile
Last active October 18, 2018 14:36
Ansible 2.7 breaks include_tasks in handlers
# -*- mode: ruby -*-
# vi: set ft=ruby :
guests = [
{ name: 'ansible-old', ansible_ver: '2.6.5', verbose: false },
{ name: 'ansible-new', ansible_ver: '2.7.0', verbose: true },
]
script = <<-SCRIPT
cat << "EOF" > playbook.yml