Skip to content

Instantly share code, notes, and snippets.

@elvetemedve
elvetemedve / Vagrantfile
Last active August 29, 2015 14:18
Vagrant global configuration
# ~/.vagrant.d/Vagrantfile
Vagrant.configure('2') do |config|
config.vm.provider :virtualbox do |vbox, override|
vbox.memory = 2048
vbox.cpus= 2
# Automatically remove unused virtual network interfaces (vboxnet*) when destroying a VM.
vbox.destroy_unused_network_interfaces = true
end
@elvetemedve
elvetemedve / keybase.md
Created September 7, 2016 14:48
Keybase.io

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@elvetemedve
elvetemedve / Arch Linux, Fedora
Last active December 31, 2021 11:30
Allow Vagrant usage without providing sudo password
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL
#
# Arch Linux, Fedora sudoers entries
#
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
@elvetemedve
elvetemedve / 85-yubikey.rules
Created October 28, 2018 19:59
Lock/unlock user session on Linux with Yubikey
# Yubikey Udev Rule: running a bash script in case your Yubikey is inserted/removed
ACTION=="add", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh unlock"
ACTION=="remove", ENV{PRODUCT}=="1050/407/511", ENV{DEVTYPE}=="usb_device", RUN+="/usr/local/bin/pam-session-locker.sh lock"