Skip to content

Instantly share code, notes, and snippets.

View rosskarchner's full-sized avatar
🤘
ROLLBACK_COMPLETE

Ross M Karchner rosskarchner

🤘
ROLLBACK_COMPLETE
View GitHub Profile
@rosskarchner
rosskarchner / gist:e47318c788db5e0b4150
Created June 9, 2014 16:29
Baby's first text file
<D-i>
fc
asccv uhfgbbrxm7 rxxxxxrrrrrmmmmmr v bbb

Keybase proof

I hereby claim:

  • I am rosskarchner on github.
  • I am rossk (https://keybase.io/rossk) on keybase.
  • I have a public key whose fingerprint is D9E5 3B8E E0C9 C749 D45F B992 1EAE 2EB7 A38E D0D9

To claim this, I am signing this object:

if (event.keyCode == 8) {
pass1.value = pass1.value.substring(0, pass1.value.length - 1);
pass2.value = pass2.value.substring(0, pass2.value.length - 1);
if (pass2.value.length == 0) pass1.value = '';
} else if (event.keyCode != 13) {
pass1.value += pass2.value.replace(/(^[\s]*)|([\s]*$)/g, '');
if (pass2.value.length == 1) pass2.value = ' ';
else if (pass2.value.length == 4) pass2.value = ' ';
else if (pass2.value.length == 6) pass2.value = ' ';
else if (pass2.value.length == 8) pass2.value = ' ';
import adnpy
import sys
# Set the default access token for API calls.
adnpy.api.add_authorization_token('AQAAAAAACqdtFdqwsJmFbaDL036aIM8RDgQKvbDhXBfFJRMl0IQkurrGfBROJQ5Qx0mEf0oYYdnecAyEZR29jgkEPUTaPes_zg')
while True:
try:
text = raw_input('> ')
if text:
@rosskarchner
rosskarchner / gist:9191085
Created February 24, 2014 16:00
Declaring bookmark bankruptcy, I wanted to clear out my xmarks account. There's no built in way, but running this in the javascript console (while viewing my.xmarks.com) seems to work.
function start() {
Foxmarks.BookmarkManager.removeSelectedNode()
setTimeout(start, 2000);
}
start();
@rosskarchner
rosskarchner / gist:2872155
Created June 5, 2012 02:30
This ical (valid according to http://icalvalid.cloudapp.net/ and http://severinghaus.org/projects/icv/) can't be parsed by collective.icalendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Meetup//RemoteApi//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-ORIGINAL-URL:http://www.meetup.com/DevOpsDC/events/ical/DevOpsDC/
X-WR-CALNAME:Events - DevOpsDC
BEGIN:VTIMEZONE
TZID:America/New_York
TZURL:http://tzurl.org/zoneinfo-outlook/America/New_York
@rosskarchner
rosskarchner / gist:1831953
Created February 15, 2012 00:14
CooksIllustrated.com recipe database to Evernote
import mechanize, codecs
from BeautifulSoup import BeautifulSoup, Comment
ci_login_url="https://auth.cooksillustrated.com/"
recipe_search_root="http://www.cooksillustrated.com/search/results.asp"
initial_query='?query=+&filters=&sort=&filters=type:Recipe'
br = mechanize.Browser()
br.open(ci_login_url)
@rosskarchner
rosskarchner / gist:1005705
Created June 3, 2011 01:37
In Automator, service to bookmark current Chrome tab in Pukka
on run {input, parameters}
tell application "Google Chrome"
set myURL to URL of active tab of window 1
set myTitle to title of active tab of window 1
end tell
tell application "Pukka"
set post URL to myURL
@rosskarchner
rosskarchner / gist:1001799
Created June 1, 2011 04:43
Script that adds OpenMeta tags to Pukka cache
#! /usr/bin/python
#requires: openmeta command line tool, openmeta python library
from glob import glob
from plistlib import readPlistFromString
import shlex, subprocess, openmeta
get_xml="plutil -convert xml1 -o - %s"
@rosskarchner
rosskarchner / gist:967562
Created May 11, 2011 22:47
Saves the visible page in Chrome as a full-page screenshot, in Evernote, via the freeware Paparazzi! app
on run {input, parameters}
tell application "Google Chrome"
set myURL to URL of active tab of window 1
set myTitle to title of active tab of window 1
end tell
tell application "Paparazzi!"
capture myURL min size {1024, 728}