Skip to content

Instantly share code, notes, and snippets.

View Kentzo's full-sized avatar
🤖

Ilya Kulakov Kentzo

🤖
View GitHub Profile
void _NoReentryScopeEnter(BOOL *aVar)
{
if (*aVar)
[NSException raise:NSInternalInconsistencyException format:@"the method is not reentrable"];
*aVar = YES;
}
void _NoReentryScopeLeave(BOOL **aVar)
{
@Kentzo
Kentzo / gist:2271865
Created April 1, 2012 06:00
JTR's implement ion of SHA1 on OpenCL
/* Keep values shared by code and the OpenCL kernels here. This file is
* prepended to the OpenCL kernels during make. */
#define MD4_NUM_KEYS 1024*2048
#define MD4_PLAINTEXT_LENGTH 15
#ifdef MD4
#define PLAINTEXT_LENGTH 15
#endif
@Kentzo
Kentzo / dlcourse.tf
Last active October 23, 2019 02:16
Set up AWS environment for dlcourse.ai using Terraform
# See https://www.terraform.io
# ---
# Variables
# ---
# Deep Learning AMI https://aws.amazon.com/marketplace/pp/B077GCH38C
variable "ami" {
default = "ami-0656a055aec8320d6"
}
NS_SWIFT_NAME(RecorderControlStyle)
@interface SRRecorderControlStyle: NSObject
@end
NS_SWIFT_NAME(SRRecorderControlStyle.Components)
// NS_SWIFT_NAME(RecorderControlStyle.Components) also works!
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance)
var sandwich: Sandwich?
var preferences: Sandwich.Preferences?
var breadType: Sandwich.Preferences.BreadType?
@interface Sandwich: NSObject
@end
NS_SWIFT_NAME(Sandwich.Preferences)
@interface SandwichPreferences: NSObject
@end
typedef NS_ENUM(NSInteger, SandwichBreadType) {
} NS_SWIFT_NAME(SandwichPreferences.BreadType);
NS_SWIFT_NAME(RecorderControlStyle)
@interface SRRecorderControlStyle: NSObject
@end
NS_SWIFT_NAME(RecorderControlStyle.Components)
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance)
{} NS_SWIFT_NAME(RecorderControlStyle.Components.Appearance);
var style: RecorderControlStyle?
var components: RecorderControlStyle.Components?
var appearance: RecorderControlStyle.Components.Appearance?
@interface SRRecorderControlStyle: NSObject
@end
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance) {};
@Kentzo
Kentzo / appledocs.m
Created May 23, 2019 18:44
NS_SWIFT_NAME is recursive
@interface Sandwich: NSObject
@end
NS_SWIFT_NAME(Sandwich.Preferences)
@interface SandwichPreferences: NSObject
@end
typedef NS_ENUM(NSInteger, SandwichBreadType) {
} NS_SWIFT_NAME(SandwichPreferences.BreadType);