Skip to content

Instantly share code, notes, and snippets.

View professorjamesmoriarty's full-sized avatar

John Jenkins professorjamesmoriarty

View GitHub Profile
Open up browser console, for Chrome, hit F12 and copy-paste and enter this
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);
Repeat until all items are unsaved.
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Johnathan "Shaggytwodope" Jenkins <twodopeshaggy@gmail.com>
#
# Distributed under terms of the GPL2 license.
import argparse
import os
import urllib.request
#!/bin/bash
for msgid in $(notmuch search --output=messages tag:unread); do
msgjson=$(notmuch show --format=json --body=false --entire-thread=false "$msgid")
subject=$(echo "$msgjson" | jq 'recurse(.[]?) | .Subject? | select(length > 0)' -r)
sender=$(echo "$msgjson" | jq 'recurse(.[]?) | .From? | select(length > 0)' -r)
if echo "$sender" | grep -q '<'; then
sender=$(echo "$sender" | cut -d '<' -f2 | cut -d '>' -f1)
fi
notify-send "$sender" "$subject" -i /riddlebox/Dropbox/Photos/Icons/myicon70x70.png
mailboxes \
"+gmail/INBOX" \
"+gmail/all" \
"+gmail/voice" \
"+gmail/important" \
"+gmail/archive" \
"+gmail/sent" \
"+gmail/drafts" \
"+gmail/spam" \
"+gmail/trash" \
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Johnathan "Shaggytwodope" Jenkins <twodopeshaggy@gmail.com>
#
# Distributed under terms of the GPL2 license.
import os
import urllib.request
#!/usr/bin/env bash
# AUTHOR: shaggy
# FILE: updatecalcurse
# ROLE: TODO (some explanation)
# CREATED: 2014-12-21 18:17:01
# MODIFIED: 2015-08-21 15:59:32
function check {
if (( $(pidof calcurse | wc -w) == 1 )); then
echo -e "Calcurse is already Running... Killing"
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.002 000.002: --- VIM STARTING ---
000.047 000.045: Allocated generic buffers
000.092 000.045: locale set
000.094 000.002: window checked
#
# bspwm hotkeys
#
# quit bspwm normally
super + alt + Escape
bspc quit
#
# bspwm hotkeys
#
# quit bspwm normally
super + alt + Escape
bspc quit
#!/bin/sh
# Set $PUUSH_API_KEY to your key and export it.
# The key is found on <http://puush.me/account/settings>.
if [ -z "$PUUSH_API_KEY" ]; then
echo "puu: please export api key" 1>&2
exit 1
fi
for file in "$@"; do