Skip to content

Instantly share code, notes, and snippets.

View dschep's full-sized avatar

Daniel Schep dschep

View GitHub Profile
- 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 / 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:

@dschep
dschep / run.sh
Last active June 28, 2017 07:04
Helium(Carbon) backup script for use ON android device. (NO PC REQUIRED!!)
CLASSPATH=$(pkg=$(pm path com.koushikdutta.backup);echo ${pkg#*:}) app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2
@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 / gh-notify
Last active January 8, 2016 19:49
Stupid simple GitHub desktop notifications! Requires cURL, jq, and notify-send.
#!/bin/bash
USER='Your username, Duh.'
TOKEN='An access token that has access to notifications, make one here: https://github.com/settings/tokens'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
API_URL=https://api.github.com
date=
while sleep 30; do
curl -u $USER:$TOKEN $API_URL/notifications?since=$date |\
@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 / _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 / vbox-check
Created December 3, 2014 21:56
Check if running in VirtualBox
sudo -n dmidecode -s bios-version | grep VirtualBox
@dschep
dschep / fartscroll.js bookmarklet
Last active December 17, 2015 03:59
fartscroll.js
javascript:(function(){function b(b,e){var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.src=b;var d=!1;a.onload=a.onreadystatechange=function(){if(!d&&(!this.readyState||"loaded"==this.readyState||"complete"==this.readyState))d=!0,e(),a.onload=a.onreadystatechange=null,c.removeChild(a)};c.appendChild(a)}void 0===window.jQuery?b("https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js",function(){$("<script>").attr("type","text/javascript").text("$.noConflict();").appendTo("body");
b("https://raw.github.com/theonion/fartscroll.js/master/fartscroll.js",function(){jQuery(document).fartscroll()})}):b("https://raw.github.com/theonion/fartscroll.js/master/fartscroll.js",function(){jQuery(document).fartscroll()})})();
@dschep
dschep / README.md
Last active December 14, 2015 17:19
Bechdel Test Passing Rates

This is computed from the results on http://bechdeltest.com/

The data is very sparse before 1930ish, leading to some 100% pass rates.