Skip to content

Instantly share code, notes, and snippets.

@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active May 10, 2024 15:41
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@SpotlightKid
SpotlightKid / github_download.py
Created August 6, 2014 14:12
Github file viewer / general URL download script for Pythonista
"""Prompt user for URL and filename and download the remote resource to a file.
If the clipboard contains a HTTP(S) or FTP(S) URL, the URL input dialog is
pre-filled with it.
The suggested local filename is extracted from the URL, if possible.
If a github file viewer URL is given, it is transformed into the matching
raw file access URL, which makes it easier to download files on github you
are viewing in your browser. Just copy the URL to the clipboard, change to
@N4M3Z
N4M3Z / brew.install.quicklook.sh
Last active September 6, 2020 00:21
Install Quick Look Plugins (OS X Caskroom)
#!/bin/sh
##
# Quick Look Plugins
# @url http://caskroom.io
# @brief Quick Look Plugins installed via Homebrew Cask
#
# For a comprehensive overview of Quick Look plugins look here: https://github.com/sindresorhus/quick-look-plugins
#
brew cask install qlcolorcode # Preview source code files with syntax highlighting
brew cask install qlstephen # Preview plain text files without a file extension. Example: README, CHANGELOG, etc.
@omz
omz / PythonistaFTP.py
Last active May 17, 2023 12:43
PythonistaFTP.py
'''FTP server for Pythonista (iOS)
You can use this to exchange files with a Mac/PC or a file management app on the same device (e.g. Transmit).
If you use a Mac, you can connect from the Finder, using the "Go -> Connect to Server..." menu item.
'''
import os
from socket import gethostname
@steventroughtonsmith
steventroughtonsmith / wwdc15sessionlister.m
Last active December 3, 2015 22:51
WWDC 15 Session Video Lister
//
// main.m
// wwcd15sessionlister
//
// Created by Steven Troughton-Smith on 10/06/2015.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
anonymous
anonymous / blockerList.json
Created June 25, 2015 00:05
Testing Safari Content Blocker on iMore.com
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
@omz
omz / touchid.py
Last active November 15, 2023 23:35 — forked from alessaba/TouchID.py
TouchID.py
# coding: utf-8
from objc_util import *
import threading
NSBundle = ObjCClass('NSBundle')
LocalAuthentication = NSBundle.bundleWithPath_('/System/Library/Frameworks/LocalAuthentication.framework')
LocalAuthentication.load()
LAContext = ObjCClass('LAContext')
# authenticate() will raise one of these exceptions when authentication
@jsbain
jsbain / mail.py
Last active August 30, 2019 18:23
mail.py
# coding: utf-8
import objc_util
from objc_util import *
# setup an array of objects we cannot discard
objc_util.retain=getattr(objc_util,'retain',[])
root_vc = UIApplication.sharedApplication().keyWindow().rootViewController()
def mailComposeController_didFinishWithResult_error_(self, sel, controller, result, error):
root_vc.dismissModalViewControllerAnimated_(True)
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@rmkane
rmkane / GAME_MASTER_v0_1.json
Created July 17, 2016 04:25
Pokemon GO Game Data
{
"Items": [ {
"TemplateId": "BADGE_BATTLE_ATTACK_WON",
"Badge": {
"BadgeType": "BADGE_BATTLE_ATTACK_WON",
"BadgeRanks": 4,
"Targets": "\\nd\\350\\007"
}
}, {
"TemplateId": "BADGE_BATTLE_TRAINING_WON",