Skip to content

Instantly share code, notes, and snippets.

View millerjp's full-sized avatar

Johnny Miller millerjp

View GitHub Profile
@bcantoni
bcantoni / Vagrantfile
Created September 15, 2014 22:20
Example of passing a host environment variable through to a guest, using Vagrant script provisioner
# -*- mode: ruby -*-
# vi: set ft=ruby :
# test setting a guest environment variable based on a host environment variable
# if FOO_BAR is set locally, create command to add it to .profile in the guest
env_var_cmd = ""
if ENV['FOO_BAR']
value = ENV['FOO_BAR']
env_var_cmd = <<CMD
@millerjp
millerjp / gist:58495a4b0f09890ec273
Last active August 29, 2015 14:22
After replacing trackpad on W540, add this to /usr/share/X11/xorg.conf.d/20-thinkpad.conf on Mint 17.1 to get middle button scrolling working
Section "InputClass"
Identifier "Touchpad/TrackPoint"
MatchProduct "PS/2 Generic Mouse"
MatchDriver "evdev"
Option "EmulateWheel" "1"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "0"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection
@alopresto
alopresto / gpg_git_signing.md
Last active January 18, 2024 22:42
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)