Skip to content

Instantly share code, notes, and snippets.

View byss's full-sized avatar

Kirill Bystrov byss

  • Georgia, Tbilisi
View GitHub Profile
@byss
byss / UIKitDebuggingOverlay.c
Last active May 5, 2019 06:40
Enables UIDebuggingOverlay by overriding all UIKit device checks
//
// UIKitDebuggingOverlay.c
// Created by Kirill Bystrov on 5/4/19.
//
#include <dlfcn.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@byss
byss / KBLayoutGuidePlaceholderView.swift
Last active October 8, 2020 16:06
Crude support for UILayoutGuide in Interface Builder
//
// KBLayoutGuidePlaceholderView.swift
// Copyright © 2019 Kirill byss Bystrov. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
#if DEBUG
@implementation NSURLRequest (curlString)
- (NSString *) curlString {
NSMutableString *result = [[NSMutableString alloc] initWithString:@"curl -v "];
[result appendFormat:@"-X '%@' ", self.HTTPMethod];
[self.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) {
[result appendFormat:@"-H '%@: %@' ", key, obj];
}];
#import <Foundation/Foundation.h>
@interface NSInvocation (blah)
+ (NSInvocation *) invocationWithTarget:(id)target selector:(SEL)selector arguments:(void *)firstArgument, ... NS_REQUIRES_NIL_TERMINATION;
+ (NSInvocation *) undoInvocationWithTarget:(id)target selector:(SEL)selector arguments:(void *)firstArgument, ... NS_REQUIRES_NIL_TERMINATION;
@end
static NSUInteger const ARArgumentsListInvocationFirstArgumentIndex = 2;
#!/usr/bin/env python
import re
import csv
import sys
import urlparse
import dateutil.parser
class Counter:
def __init__ (self):