This file contains hidden or 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
// | |
// NSApplication+MXUtilities.h | |
// Mixim | |
// | |
// Created by Joe Rickerby on 15/09/2014. | |
// Copyright (c) 2014 Mixim Technology Ltd. Released under BSD Licence. | |
// | |
#import <Cocoa/Cocoa.h> |
This file contains hidden or 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
// | |
// MXCheckedOperation.h | |
// Mixim | |
// | |
// Created by Joe Rickerby on 25/03/2014. | |
// Copyright (c) 2014 Mixim Technology Ltd. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or 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
- (NSImage *)_cornerMask | |
{ | |
CGFloat radius = 4.0; | |
CGFloat dimension = 2 * radius + 1; | |
NSSize size = NSMakeSize(dimension, dimension); | |
NSImage *image = [NSImage imageWithSize:size flipped:NO drawingHandler:^BOOL(NSRect dstRect) { | |
NSBezierPath *bezierPath = [NSBezierPath bezierPathWithRoundedRect:dstRect xRadius:radius yRadius:radius]; | |
[[NSColor blackColor] set]; | |
[bezierPath fill]; |
This file contains hidden or 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
test_list = [1,2,5,2] | |
def for_loop(the_list): | |
result = 0 | |
for number in the_list: | |
result += number | |
return result |
This file contains hidden or 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
#define MXCreate(create, ...) \ | |
({ \ | |
__typeof__(create) obj = create; \ | |
metamacro_foreach(_MXCreate_set, ;, __VA_ARGS__); \ | |
obj; \ | |
}) | |
#define _MXCreate_set(index, set_expr) obj . set_expr | |
// before | |
_rolloverLabel = [[NSTextField alloc] init]; |
This file contains hidden or 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
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"> | |
<channel> | |
<title>Tide Changelog</title> | |
<link></link> | |
<description>Most recent changes with links to updates.</description> | |
<language>en</language> | |
<item> | |
<title>v0.2.11</title> | |
<pubDate>Sat, 31 Oct 2014 17:20:11 +0000</pubDate> | |
<enclosure |
This file contains hidden or 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 tingbot | |
from tingbot import * | |
screen.fill(color='black') | |
screen.text('Waiting...') | |
@webhook('demo_sms') | |
def on_webhook(data): | |
screen.fill(color='black') | |
screen.text(data, color='green') |
This file contains hidden or 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 <objc/runtime.h> | |
@interface Person : NSObject | |
@property (strong) NSString *name; | |
@end | |
@interface Observer : NSObject |
OlderNewer