Skip to content

Instantly share code, notes, and snippets.

@webster
webster / 278requests.py
Created April 1, 2017 13:57 — forked from stevenrich-zz/278requests.py
Automating Personal Financial Disclosure requests to White House
import csv, time
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
applicant_name = # your name
applicant_email = # your email
applicant_address = # your physical address
occupation = # your occupation
@webster
webster / diskutil_encrypt_etd.sh
Last active September 3, 2016 13:57 — forked from cachrisman/diskutil_encrypt_etd.sh
bash script to show speed, data remaining and estimated time to completion of Apple OS X FileVault 2 encryption/decryption process
#!/bin/bash
# Original source: https://gist.github.com/cachrisman/7b0e1b4bd17f9feb20a3
interval=5 # Sampling time in seconds
volumename="477A0F99-5BE8-487A-8794-85EA9C0A778A"
total_size=$(diskutil cs info "$volumename" | grep -E "LV Size" | awk '{print $3}')
while [ true ]; do
first_size=$(diskutil cs info "$volumename" | grep -E "LV Bytes Converted" | awk '{print $4}')
@webster
webster / HTML language
Created November 22, 2011 18:40 — forked from kornelski/HTML language
TextMate HTML language tweaked to support unquoted attributes
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))