Skip to content

Instantly share code, notes, and snippets.

View tripox's full-sized avatar
🦄
Unicorns!

Mathias Larsen tripox

🦄
Unicorns!
View GitHub Profile
@beddari
beddari / install_vagrant_sudoers.sh
Created December 13, 2011 12:47
Allow Vagrant sudo-access without password for NFS-setup
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
if [ -z "$1" ]; then
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp)
cat > $TMP <<EOF
Cmnd_Alias VAGRANT_EXPORTS_ADD = /bin/su root -c echo '*' >> /etc/exports
Cmnd_Alias VAGRANT_NFSD = /etc/init.d/nfs-kernel-server restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -e /*/ d -ibak /etc/exports
@jmolivas
jmolivas / DefaultController.php
Last active August 20, 2022 18:57
Drupal 8 example: How to render a Twig template and load a CSS file from a Controller
<?php
namespace Drupal\acme\Controller;
use Drupal\Core\Controller\ControllerBase;
class DefaultController extends ControllerBase
{
/**
@filmgirl
filmgirl / el-capitan-install-usb
Last active November 30, 2019 04:05
Create Bootable USB Drive for OS X El Capitan
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction
@LeonardoCardoso
LeonardoCardoso / GPG-Tower
Last active April 21, 2023 11:53
How to setup Tower to use the GPG Suite
# GPG on Tower
@lox
lox / make_docker_great_again.sh
Last active January 19, 2023 07:17
Tweak flush and sync settings for Docker for Mac
#!/bin/bash
set -euo pipefail
# via https://github.com/docker/for-mac/issues/668#issuecomment-284028148
cd ~/Library/Containers/com.docker.docker/Data/database
git config --global user.useconfigonly false
git reset --hard > /dev/null
mkdir -p ./com.docker.driver.amd64-linux/disk
touch ./com.docker.driver.amd64-linux/disk/full-sync-on-flush