Skip to content

Instantly share code, notes, and snippets.

@bolencki13
bolencki13 / BTOTransparentViewController.h
Created October 31, 2017 20:16
Transparent View Controller
//
// BTOTransparentViewController.m
//
// Created by Brian Olencki on 10/31/17.
//
#import "BTOTransparentViewController.h"
@interface BTOTransparentViewController ()
@bolencki13
bolencki13 / gist:243420f68663664d06288dd8c6bf773f
Created August 11, 2017 15:26
Regex Password Validation
/*
Valid password condition:
• At least 8 characters long
• At least one upper-case letter
• At least one lower-case letter
• At least one numeric digit
*/
((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])){8,}
@bolencki13
bolencki13 / LogTrace.m
Last active December 16, 2019 15:27
Log Method Trace
#import <Foundation/Foundation.h>
#import <dlfcn.h>
void logTrace(BOOL on) {
typedef void functype(BOOL);
void *libobjc = dlopen("/usr/lib/libobjc.dylib", RTLD_LAZY);
functype *instrumentObjcMessageSends = dlsym(libobjc, "instrumentObjcMessageSends");
if (!instrumentObjcMessageSends) {
NSLog(@"Couldn't get instrumentObjcMessageSends");
exit(1);
@bolencki13
bolencki13 / colorChange.py
Created March 29, 2017 16:35
Change the color of an image file
from PIL import Image
import sys
import os
picture = None
picturePath = None
def validateColor(hex):
return (len(hex) == 7)
@bolencki13
bolencki13 / WKWebView+Complete.h
Created March 26, 2017 16:28
WKWebView load request with completion block
//
// WKWebview+Complete.h
// partyface
//
// Created by Brian Olencki on 3/26/17.
// Copyright © 2017 Brian Olencki. All rights reserved.
//
#import <WebKit/WebKit.h>