Skip to content

Instantly share code, notes, and snippets.

View dschep's full-sized avatar

Daniel Schep dschep

View GitHub Profile
@dschep
dschep / vbox-check
Created December 3, 2014 21:56
Check if running in VirtualBox
sudo -n dmidecode -s bios-version | grep VirtualBox
@dschep
dschep / _etc_udev_rules.d_98-autorandr.rules
Created January 29, 2015 00:10
Automatically call autorandr
# detect monitor [un]plug events, and call autorandr
SUBSYSTEM=="drm", ACTION=="change", RUN+="/bin/bash -c 'DISPLAY=:0 sudo -u $(who|sed -nre s/\(.*\)\\s:0.*/\\1/p) /usr/bin/autorandr -c'"
@dschep
dschep / bashrc
Last active August 29, 2015 14:15
Quick Vi mode for Bash & Readline, with superminimal PS1
set -o vi
bind -m vi-insert "\C-l":clear-screen
PS1='[\u@\h:\W] \$ ' # plain & static liquidprompt-esque prompt
@dschep
dschep / gist:6004fbe69fceacd340e2
Created May 21, 2015 18:37
Use Shift-Esc as ~ (For use on Lenovo X1 Carbon 2014)
xmodmap -e 'keycode 9 = Escape asciitilde Escape'
@dschep
dschep / keybase.md
Created July 7, 2015 19:03
keybase.md

Keybase proof

I hereby claim:

  • I am dschep on github.
  • I am dschep (https://keybase.io/dschep) on keybase.
  • I have a public key whose fingerprint is 583B 5A11 0703 B4F5 C5F8 A28D 1D09 8FA6 AE40 D301

To claim this, I am signing this object:

- name: Compute Vagrant latest version
sudo: no
shell: wget -qO - https://dl.bintray.com/mitchellh/vagrant/|sed -n 's/.*href=\"\([^"]*\).*/\1/p'|grep x86_64\.deb|tail -1|cut -d'%' -f2
register: vagrant_file_name
- name: Download Vagrant latest version
sudo: no
get_url: url="https://dl.bintray.com/mitchellh/vagrant/{{ vagrant_file_name.stdout }}" dest="/tmp/{{ vagrant_file_name.stdout }}"
- name: Install Vagrant latest version
@dschep
dschep / .xinitrc
Created October 15, 2011 14:33
/r/linux guy's 'dx:hr gui revelation' dwm prototype
#!/bin/bash
google-chrome --app=https://mail.google.com/ &
google-chrome &
xterm &
xterm &
xterm &
xterm &
nautilus --no-desktop &
@dschep
dschep / grid.js
Created October 11, 2012 20:38 — forked from webxl/grid.js
CSS prototyping bookmarklet
javascript:(function(){s1=document.createTextNode('.guidesOn::before { content:""; position:fixed; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjVJivzgAAAAyUlEQVRoQ%2B2abQqAIBBEPW1X6CzdqTv1RUFIipi2o72gPyXV7uybKci5wDZM8xI6dz%2Buvs6pP2Dq81GI2qiiiJkiOzQ97EGHTXUF9XUwYsaI2o1LjyqjpaYwiqDI2YFs2HtI9Wjx2Z0R%2B1ADdmB%2FC7taB0uzCSNqCqOImSIkeyW7xLXMZvqjdzJcS01hFEGRSnbe3miR7JVGgWRXcxkUQRFgj%2F8Y8htGtkJHL%2FvGaGtKd6bU9Z4C%2FCiEZDeCPahIa%2FbbDSNX433mVkIrV5rTnhDyAAAAAElFTkSuQmCC) 50% 0; z-index:1; top:0; right:0; bottom:0; left:0; opacity:.3; pointer-events:none; } * { -webkit-user-modify: read-write; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; } a { -webkit-user-modify: initial; }');s2=document.createTextNode('#a1_z { background-color: #fff; background-color: rgba(255,255,255,.8); float: left; position: fixed; z-index:2; padding: 3px; bo
@dschep
dschep / gist:3875321
Created October 11, 2012 20:39
Ugly bookmarklet to get shutterfly JPGs
dojo.query('.share-item-inner img').forEach(function(e){var l=document.createElement('a');var u=e.style['background-image'].slice(4,-1).replace('procsrserv','procgtaserv');u=u.slice(0,u.lastIndexOf('/'));l.setAttribute('href',u);l.innerHTML='fullres jpg';e.parentNode.parentNode.appendChild(l)});
@dschep
dschep / gist:3886934
Created October 14, 2012 01:41
Alert Bookmarklet
javascript:alert('hello world!');