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
// | |
// WKWebview+Complete.h | |
// partyface | |
// | |
// Created by Brian Olencki on 3/26/17. | |
// Copyright © 2017 Brian Olencki. All rights reserved. | |
// | |
#import <WebKit/WebKit.h> |
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
from PIL import Image | |
import sys | |
import os | |
picture = None | |
picturePath = None | |
def validateColor(hex): | |
return (len(hex) == 7) |
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
#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); |
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
/* | |
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,} |
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
// | |
// BTOTransparentViewController.m | |
// | |
// Created by Brian Olencki on 10/31/17. | |
// | |
#import "BTOTransparentViewController.h" | |
@interface BTOTransparentViewController () |
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
npm r -g $(node -e "console.log(process.argv.filter((e) => e !== '├──' && e !== '└──').filter((_, i) => i > 1).map((e) => e.split('@')[0]).filter((e) => e !== 'npm').join(' '))" $(npm list -g -depth 0)) |
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
/** | |
* The purpose of this decorator is to re-assign the default value when the incoming value is null or undefined. | |
* This can be modified to ignore null or undefined as an incoming value. | |
*/ | |
type UseDefaultOptions = { | |
whenNull?: boolean; | |
whenUndefined?: boolean; | |
}; |
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
/** | |
* Exposes internal promise methods on the class that resolves a result of type T | |
*/ | |
abstract class PromiseBuilder<T> implements Promise<T> { | |
/** | |
* Result to be returned when builder is resolved | |
*/ | |
protected abstract _fetchResult(): Promise<T> |
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
type CompareNumbers< | |
T extends number, | |
U extends number, | |
A extends any[] = [], | |
> = T extends U | |
? 0 : A['length'] extends T | |
? -1 | |
: A['length'] extends U | |
? 1 | |
: CompareNumbers<T, U, ['a', ...A]> |
OlderNewer