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: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();
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:
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 = ' ';

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:

@rosskarchner
rosskarchner / gist:e47318c788db5e0b4150
Created June 9, 2014 16:29
Baby's first text file
<D-i>
fc
asccv uhfgbbrxm7 rxxxxxrrrrrmmmmmr v bbb
"1.1
loadplugins '\.(js|penta)$'
group user
" Allow GMail shortcuts
set passkeys+=mail.google.com:jksacrqG#~`<CR>,gi,gl,gp
" Let Hint Message from X Links
autocmd LocationChange mail.google.com set ht+=span.ata-asJ
" Let Hint Expand Collapsed Conversations
@rosskarchner
rosskarchner / gist:4d422ea45fb0448e85df
Last active August 29, 2015 14:03
The Ross Karchner Twitter Idea Anthology
Idea: homeopathic coffee
Book idea: FISMA for the Perplexed
Not much of an opinion on Flappy Bird (it's fun), the idea is limited availability or small-run apps is pretty interesting.
Silly game idea: simulate playing arcade games on a windshield HUD, so, for example, you have to play breakout and drive. (virtually)
Idea: a first-in, first out laundry hamper.
Idea: Shazam for the noises a malfunctioning appliance or car might make.
Idea: the "million dollar homepage" business model + @leafletjs = infinite money http://t.co/uYxJmohX
Idea: Massively Multiplayer Battleship!
comedy idea: Talib poses as a woman online to trick enemy soldiers, begins to prefer his online persona to real life http://t.co/w8cwxEIU
Idea: video chat + rap battles. Call it "FaceRhyme".
if 'result' in result:
cg, created = CachedGeodata.objects.get_or_create(key=key)
cg.lat=result['result'][1]
cg.lon=result['result'][2]
cg.expires = int(time.time()) + getattr(settings, 'DJANGO_HUD_GEODATA_EXPIRATION_INTERVAL', 1728000)
cg.save()
data = result
def conjunction(left_conjunct,right_conjunct):
return bool(left_conjunct and right_conjunct)
def disjunction(left_disjunct,right_disjunct):
return bool(left_disjunct or right_disjunct)
def negation(a):
return not(a)
def implication(antecedent, consequent):
[extras]
name=CentOS-7 - Extras
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/7.1.1503/os/x86_64/RPM-GPG-KEY-CentOS-7
priority=1
includepkgs=docker* golang*