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
#!/usr/bin/python3 | |
import os | |
import csv | |
romPath = 'ROMs/dsprom.rom' | |
csvPath = 'dsprom.csv' | |
with open(romPath, 'rb') as file: | |
output = open(csvPath, 'w') |
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
__attribute__((objc_root_class)) @interface BaseClass | |
- (id)propertyListRepresentation __attribute__((objc_requires_super)); | |
@end | |
@implementation BaseClass | |
- (id)propertyListRepresentation | |
{ | |
return 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
long long -[AVCaptureMovieFileOutput recordedFileSize](void * self, void * _cmd) { | |
r14 = *_OBJC_IVAR_$_AVCaptureMovieFileOutput._internal; | |
OSSpinLockLock(*(self + r14) + *_OBJC_IVAR_$_AVCaptureMovieFileOutputInternal.statsLock); | |
rdi = *(self + r14); | |
rbx = rdi->sizeWritten; | |
OSSpinLockUnlock(rdi + *_OBJC_IVAR_$_AVCaptureMovieFileOutputInternal.statsLock); | |
rax = rbx; | |
return rax; | |
} |
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
#ifdef __OBJC__ | |
// clang -framework Foundation -o ObjC -ObjC main.c | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char **argv) | |
{ | |
NSString *string = [[NSString alloc] initWithUTF8String:"Objective-C"]; |
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> | |
@protocol SomeProtocol <NSObject> | |
- (void)someMethod; | |
@end | |
@protocol MyProtocol <SomeProtocol> | |
- (void)myMethod; |
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
+ (NSCharacterSet *)ignoredCharactersBeforeSmartInserts | |
{ | |
static NSCharacterSet *characterSet; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
/* | |
Character set taken from AppKit's __getPreSmartSet | |
*/ | |
NSMutableCharacterSet *mutableSet = [NSMutableCharacterSet characterSetWithCharactersInString:@"([\\\"'#$/-`{<"]; |
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 <GameKit/GameKit.h> | |
@interface GKLeaderboard (IdentifierSupport) | |
@property (copy, readonly) NSString *identifier; | |
@end | |
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
// vertex shader | |
attribute vec4 a_color; | |
attribute vec4 a_position; | |
attribute vec2 a_tex_coord; | |
varying mediump vec2 v_tex_coord; | |
varying lowp vec4 v_color_mix; | |
void main() { | |
v_color_mix = a_color; | |
v_tex_coord = a_tex_coord; | |
gl_Position = a_position; |
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
// vertex shader | |
uniform float u_selected; | |
attribute vec4 a_position; | |
attribute vec4 a_color; | |
varying lowp vec4 v_color; | |
void main() { | |
if (u_selected > 0.0) { | |
v_color = vec4(0.5, 1.0, 1.0, 1.0); | |
} else { | |
v_color = a_color; |
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
// vertex shader | |
attribute vec4 a_color; | |
attribute vec4 a_position; | |
attribute vec2 a_tex_coord; | |
varying highp vec2 v_tex_coord; | |
varying lowp vec4 v_color_mix; | |
void main() { | |
v_color_mix = a_color; | |
v_tex_coord = a_tex_coord; | |
gl_Position = a_position; |
NewerOlder