Skip to content

Instantly share code, notes, and snippets.

View nk9's full-sized avatar
🏗️
Building a better world, one bit at a time

Nick Kocharhook nk9

🏗️
Building a better world, one bit at a time
  • London, UK
View GitHub Profile
/*
* Modified from: https://codeshare.frida.re/@dki/ios-url-scheme-fuzzing/
*
* iOS URL Scheme Fuzzing
* Usage: frida -U --codeshare dki/ios-url-scheme-fuzzing SpringBoard
*
* Open the specified URL
* openURL("somescheme://test");
*
* Fuzz a particular URL - use {0} as placeholder for insertion points
@ssaunier
ssaunier / importpdb.sublime-snippet
Created July 5, 2018 15:11
Python debugger snippet for Sublime Text
<snippet>
<content><![CDATA[import pdb; pdb.set_trace()]]></content>
<tabTrigger>pdb</tabTrigger>
<scope>source.python</scope>
<description>import pdb</description>
</snippet>
<!-- USAGE -->
<!-- 1. Go to Tools -> New Snippet -->
@after-the-sunrise
after-the-sunrise / leveled_formatter.py
Created April 21, 2018 14:36
Python logging formatter with multiple formatters per logging level.
from logging import getLogger, Formatter, StreamHandler, DEBUG, ERROR
class LeveledFormatter(Formatter):
_formats = {}
def __init__(self, *args, **kwargs):
super(LeveledFormatter, self).__init__(*args, **kwargs)
def set_formatter(self, level, formatter):
@ethagnawl
ethagnawl / coupon-codes.txt
Created October 30, 2017 04:59
Top 100 Ecommerce Coupon Codes
# source: https://www.slideshare.net/CouponFollow/top-100-most-common-coupon-code-phrases
fall
twitter
black
MEMORIAL
TWEET20
FREESHIP
earlybird
MONDAY
holidays
@bgusach
bgusach / multireplace.py
Last active April 23, 2024 18:46
Python string multireplacement
def multireplace(string, replacements, ignore_case=False):
"""
Given a string and a replacement map, it returns the replaced string.
:param str string: string to execute replacements on
:param dict replacements: replacement dictionary {value to find: value to replace}
:param bool ignore_case: whether the match should be case insensitive
:rtype: str
"""
@clchiou
clchiou / non_graceful_shutdown.py
Created March 19, 2015 04:32
Python ThreadPoolExecutor (non-)graceful shutdown
#!/usr/bin/env python3
import concurrent.futures.thread
import sys
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
def remove_file(path):
print('Removing file %s' % path)
@cjaoude
cjaoude / gist:fd9910626629b53c4d25
Last active May 8, 2024 02:59
Test list of Valid and Invalid Email addresses
Use: for testing against email regex
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses
List of Valid Email Addresses
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com
@srt32
srt32 / install.md
Last active July 18, 2021 23:43
installing PostGIS on OSX

Installing the Postgres PostGIS extension on OSX

For reference: http://postgis.net/install

If you don’t already have PG installed

The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.

If you already have PG installed