View LCP_Encode_Decode.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launch://?url=[[list:Encode or Decode?|Encode=launch%3A%2F%2Fx-callback-url%2Fclipboard%3Ftext%3D%5Bprompt%3AText%5D%26x-success%3D%7B%7Blaunch%3A%2F%2Fclipboard%2Fconvert%3Fformat%3Durlencode%7D%7D|Decode=launch%3A%2F%2Fx-callback-url%2Fclipboard%3Ftext%3D%5Bprompt%3AText%5D%26x-success%3D%7B%7Blaunch%3A%2F%2Fclipboard%2Fconvert%3Fformat%3Durldecode%7D%7D]] |
View Get Google Cache.applescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on get_browser() | |
set valid_browsers to {"Safari", "Google Chrome"} | |
tell application "System Events" | |
set front_app to name of first application process whose frontmost is true | |
if valid_browsers contains front_app then | |
return front_app | |
else | |
set running_apps to (name of every process where background only is false) | |
repeat with valid_browser in valid_browsers |
View search_link.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
import urllib | |
import requests | |
import random | |
import operator | |
_VERSION_ = 1.6 |
View lcp_unquote.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
'''lcp_unquote.py | |
Takes a Launch Center Pro .lcpbackup file as an argument and | |
unencodes all the URL encoded stuff, possibly making it more readable, | |
and much of which is probably unnecessary after LCP 2.3.1. | |
Details: http://n8h.me/1meUxTi | |
''' | |
import re | |
import urllib.parse |
View ekg_early_repol.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
'''(1.196 x STE at 60 ms after the J-point in V3 in mm) + (0.059 x computerized QTc) - (0.326 x R-wave Amplitude in V4 in mm). | |
Use the calculator below. A value greater than 23.4 is quite sensitive and specific for LAD occlusion. | |
http://hqmeded-ecg.blogspot.com/2013/06/here-is-link-to-full-text-of-article-in.html''' | |
import sys | |
try: | |
import console | |
ios = True | |
except ImportError: |
View crashplan_dirs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
'''crashplan_dirs.py | |
Takes the crashplan log and sorts it by the most commonly used directories. | |
As of 20140907 only configured for Mac OSX. | |
''' | |
import re | |
import collections | |
import sys | |
import logging |
View buffer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// javascript:(function()%20%7Bvar%20platform%20=%20window.navigator.platform;if%20(platform%20==%20'iPhone')%20%7Bvoid(location.href='bufferapp://?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title))%7Delse%20%7Bvar%20a=document.getElementsByTagName('head')%5B0%5D%2Cb=document.createElement('script');b.type='text/javascript';b.src='http://bufferapp.com/js/bookmarklet.v1.js?';a.appendChild(b);%7D%7D)();void%200; | |
javascript:(function() { | |
var platform = window.navigator.platform; | |
if (platform == 'iPhone') { | |
void(location.href='bufferapp://?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title)) | |
} | |
else { | |
var a=document.getElementsByTagName('head')[0],b=document.createElement('script'); | |
b.type='text/javascript'; | |
b.src='http://bufferapp.com/js/bookmarklet.v1.js?'+Math.floor(Math.random()*99999); |
View pip_uninstall_batch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires GNU xargs `brew install findutils --default-names`, and I used ack instead of grep just out of habit. | |
# Will also leave the first item from the list out because of the weird way `$@` works, so manually uninstall it. | |
xargs -a <( pip3 list | ack pyobjc | cut -d " " -f 1 ) bash -c 'for f in "$@"; do echo y | pip3 uninstall "$f"; done' |
View code.gs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
var template = HtmlService.createTemplateFromFile('index'); | |
var htmlOutput = template.evaluate() | |
.setSandboxMode(HtmlService.SandboxMode.NATIVE); | |
return htmlOutput; | |
} | |
function include(filename) { |
View download_links.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -qO- http://site_in_question.html | ack -o "pattern_of_subpages\.html" | xargs -I{} bash -c 'wget -qO- "http://subpage_prefix/"{} | ack -o "(?<=src\=\").*?image_direct_link_pattern\.jpg" | (read img_link; wget "image_direct_link_subpattern/$img_link")' | |
# Broken down: | |
# wget -qO- http://site_in_question.html # wget site in question, redirects to stdout | |
# ack -o "pattern_of_subpages\.html" # searches stdin for list of links to subpages | |
# xargs -I{} bash -c # runs the following on each of those subpages | |
# wget -qO- "http://subpage_prefix/"{} # wget each subpage with {} filling in the pattern identified by ack | |
# ack -o "(?<=src\=\").*?image_direct_link_pattern\.jpg # searches the subpage for the direct link to the image | |
# (read img_link; wget "image_direct_link_subpattern/$img_link") # assigns the image pattern to a variable and wgets it |
OlderNewer