Skip to content

Instantly share code, notes, and snippets.

View dschep's full-sized avatar

Daniel Schep dschep

View GitHub Profile
@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!');
@dschep
dschep / gist:4105713
Last active March 21, 2023 01:47
Gmvault on Synology NAS
  1. Install Python from DSM Package Center
  2. Enable SSH
  3. SSH in
  4. Enable and switch to user shell (optional, requres user homes to be enabled)
    • set shell to /bin/ash in /etc/passwd
    • su - <user>
  5. Create directory to store all of this (optional)
    • mkdir gmvault&&cd gmvault
  6. Get virtualenv
  • wget https://raw.github.com/pypa/virtualenv/develop/virtualenv.py
@dschep
dschep / update-namecheap.sh
Created December 5, 2012 00:15
Simple namecheap update
curl "https://dynamicdns.park-your-domain.com/update?host=$HOST&domain=$DOMAIN&password=$PASSWORD&ip=`curl -s http://my-ip.heroku.com/`"
@dschep
dschep / gist:4719355
Last active May 10, 2019 21:43
Hardening Synology DSM SSL

Synology DSM 4.1 is vulnerable to BEAST and the Lucky Thirteen attacks out of the box. Switching to RC4 ciphers makes these attacks, and any other future CBC-targeting attacks, not work.

To fix this these 2 files need to be updated:

/usr/syno/apache/conf/extra/httpd-alt-port-ssl-setting.conf
/usr/syno/apache/conf/extra/httpd-ssl.conf-common

Update them such that the line starting with SSLCipherSuite is replaced with these two lines:

SSLHonorCipherOrder On
@dschep
dschep / PushBox.py
Last active February 17, 2019 13:30
PushBullet notifications when files change in Dropbox
#!/usr/bin/env python
import time
import shelve
# dropbox uses posix paths and this script should work on windows too
import posixpath
from StringIO import StringIO
from dropbox import client, rest, session
import requests
@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.

@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()})})();