Skip to content

Instantly share code, notes, and snippets.

View TheMetaphysicalCrook's full-sized avatar

The.Metaphysical.Crook TheMetaphysicalCrook

View GitHub Profile
# coding: utf-8
from objc_util import *
import console
import urllib
import dialogs
WKWebView = ObjCClass('WKWebView')
UIViewController = ObjCClass('UIViewController')
UIBarButtonItem = ObjCClass('UIBarButtonItem')
NSURLRequest = ObjCClass('NSURLRequest')
@TheMetaphysicalCrook
TheMetaphysicalCrook / Bullseye.bookmarklet
Created December 29, 2018 14:02 — forked from ttscoff/Bullseye.bookmarklet
A bookmarklet for grabbing just a piece of a web page and converting it to Markdown using heckyesmarkdown.com.
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://cdn.rawgit.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})();
@TheMetaphysicalCrook
TheMetaphysicalCrook / Gmail Filter by Search Query.md
Created August 25, 2018 21:41 — forked from dead-claudia/Gmail Filter by Search Query.md
Gmail script filter based on search queries

Gmail Filter by Search Query

This program, in the form of a configuration script and a main script, allows for Gmail search queries to be used for the equivalent of filters.

How to use:

  1. Go to script.google.com.
  2. Go to File > New > Script File, and type Main or any other name of your choosing as the title for the new script. This will be for the main script.
@TheMetaphysicalCrook
TheMetaphysicalCrook / bashrc_kubernetes_alias_completions.sh
Created August 17, 2018 20:28 — forked from idcrook/bashrc_kubernetes_alias_completions.sh
Shell command line expansion from kubernetes aliases; even complete in system namespace if bash alias uses that
# source kubectl bash completions
if hash kubectl 2>/dev/null; then
source <(kubectl completion bash)
fi
# the magic via https://github.com/cykerway/complete-alias
# seems to require BASH 4; install bash from Homebrew and make its BASH 4 the default user shell in macOS
# mkdir ~/.bash_completion.d
# curl -o ~/.bash_completion.d/bash_complete-alias.sh https://raw.githubusercontent.com/cykerway/complete-alias/master/completions/bash_completion.sh
if [ -f ~/.bash_completion.d/bash_complete-alias.sh ] ; then
@TheMetaphysicalCrook
TheMetaphysicalCrook / pulls2csv.js
Created August 13, 2018 11:01 — forked from simonflk/pulls2csv.js
Quick 'n dirty Github PR JSON to CSV
#!/usr/bin/env node
/* eslint-disable camelcase, no-console */
/**
* Quick 'n dirty Github PR JSON to CSV
* Grab JSON with:
*
* curl -u $USER https://api.github.com/repos/$ORG/$REPO/pulls?per_page=100 \
* -H X-GitHub-OTP:\ 123456 > pulls.json
*/
#!/bin/bash
# @see echo setenv SSH_AUTH_SOCK \$HOME/.ssh/ssh_auth_sock > ~/.screenrc
echo setenv SSH_AUTH_SOCK \$HOME/.ssh/ssh_auth_sock > ~/.screenrc
cat <<EOF > ~/.ssh/rc
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi
EOF
@TheMetaphysicalCrook
TheMetaphysicalCrook / quix.txt
Created July 29, 2018 13:37 — forked from michaelfox/quix.txt
Quix Commands
>
> Author: Michael Fox
> Website: http://www.michaelfox.name
>
> Quix: http://quixapp.com
>
@Quixearches Quick Searches
acronym javascript:q%20=%20""%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt("You%20didn't%20select%20any%20text.%20%20Enter%20a%20search%20phrase:",%20"");%20if%20(q!=null)%20location="http://www.acronymfinder.com/af-query.asp?Find=find&string=exact&Acronym="%20+%20escape(q);%20void%200 Acronym Search
@TheMetaphysicalCrook
TheMetaphysicalCrook / bashSelectByGlobInFinder.sh
Created July 1, 2018 08:51 — forked from RobTrew/bashSelectByGlobInFinder.sh
Bash command `lf` - like ls but selects glob-matched files in an OS X Finder window
# An lf command in my ~/.bash_profile
# like a simple ls, but selects the glob-matched files in the Finder
# `lf *.txt` to Finder-select all *.txt files in the working directory
# `lf *.[^t]?? to Finder-select all files with a 3-char extension which doesn't start with t
lf() {
local IFS=":"; local f=$@; local seln=""; fldr="$(pwd)"
for l in ${f[@]}; do
if [[ ! -d $l ]]; then
seln=$seln"file \"$l\", "
fi