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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <hb.h> | |
#include <hb-ft.h> | |
#include <cairo.h> | |
#include <cairo-ft.h> | |
#define FONT_SIZE 16 | |
#define OFFSET 0 |
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
main: main.c | |
gcc -g -O0 -o $@ $^ `pkg-config --cflags --libs cairo` |
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
emerge-rockpro64 --pretend --emptytree --verbose chromeos-chrome | |
!!! CONFIG_PROTECT is empty for '/build/rockpro64/' | |
These are the packages that would be merged, in order: | |
Calculating dependencies... done! | |
[ebuild N ] virtual/pkgconfig-0-r1::portage-stable to /build/rockpro64/ 0 KiB | |
[ebuild N ] sys-libs/zlib-1.2.11::portage-stable to /build/rockpro64/ USE="static-libs -minizip" 594 KiB | |
[ebuild N ] app-arch/xz-utils-5.2.3::portage-stable to /build/rockpro64/ USE="static-libs threads -nls" 1.456 KiB | |
[ebuild N ] sys-apps/baselayout-2.2-r1::chromiumos to /build/rockpro64/ USE="kvm_host -auto_seed_etc_files" 40 KiB |
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
curl -sL --user "${username}:${password}" https://github.com/$account/$repo/tarball/$tag_name > tarball.tar |
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 <objc/runtime.h> | |
#import <UIKit/UIKit.h> | |
#import "NSObject+Swizzling.h" | |
@implementation NSObject (Swizzling) | |
+ (void)load { | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ |
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
static func make(withKeychainItem keychainItem: SecKeychainItem) -> Credentials? { | |
var attributeTags = [SecItemAttr.accountItemAttr.rawValue] | |
var formatConstants = [UInt32(CSSM_DB_ATTRIBUTE_FORMAT_STRING)] | |
var attributeInfo = SecKeychainAttributeInfo(count: 1, tag: &attributeTags, format: &formatConstants) | |
var attributeList: UnsafeMutablePointer<SecKeychainAttributeList>? = nil | |
var passwordLength: UInt32 = 0 | |
var passwordPointer: UnsafeMutablePointer<Void>? = nil | |
let status = SecKeychainItemCopyAttributesAndData(keychainItem, |
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 "LogoutSegue.h" | |
@implementation LogoutSegue | |
- (void)perform | |
{ | |
UIViewController *destinationViewController = self.destinationViewController; | |
UIWindow *window = [[[UIApplication sharedApplication] delegate] window]; | |
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 "LoginSegue.h" | |
@implementation LoginSegue | |
- (void)perform | |
{ | |
UIViewController *sourceViewController = self.sourceViewController; | |
UIViewController *destinationViewController = self.destinationViewController; | |
UIWindow *window = [[[UIApplication sharedApplication] delegate] window]; |
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
@interface Person | |
@property NSString *name; | |
@property NSDate *birthday; | |
- (BOOL)isEqualToPerson:(Person *)person; | |
@end | |
@implementation Person | |
- (BOOL)isEqualToPerson:(Person *)person { |
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 "UIResponder+FirstResponder.h" | |
static __weak id currentFirstResponder; | |
@implementation UIResponder (FirstResponder) | |
+ (id)currentFirstResponder | |
{ | |
currentFirstResponder = nil; | |
[[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil]; |
NewerOlder