Skip to content

Instantly share code, notes, and snippets.

View obyknovenius's full-sized avatar

Vitaly Dyachkov obyknovenius

  • Cologne, Germany
  • 19:23 (UTC +02:00)
View GitHub Profile
#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
@obyknovenius
obyknovenius / Makefile
Created May 19, 2023 13:30
Cairo Paint Glyphs
main: main.c
gcc -g -O0 -o $@ $^ `pkg-config --cflags --libs cairo`
@obyknovenius
obyknovenius / 77.sh
Last active May 1, 2020 13:29
chromeos-chrome
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
@obyknovenius
obyknovenius / git-download.sh
Created July 9, 2018 12:28
Download Git archive tarballs from Private Repo
curl -sL --user "${username}:${password}" https://github.com/$account/$repo/tarball/$tag_name > tarball.tar
#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, ^{
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,
#import "LogoutSegue.h"
@implementation LogoutSegue
- (void)perform
{
UIViewController *destinationViewController = self.destinationViewController;
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
#import "LoginSegue.h"
@implementation LoginSegue
- (void)perform
{
UIViewController *sourceViewController = self.sourceViewController;
UIViewController *destinationViewController = self.destinationViewController;
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
@interface Person
@property NSString *name;
@property NSDate *birthday;
- (BOOL)isEqualToPerson:(Person *)person;
@end
@implementation Person
- (BOOL)isEqualToPerson:(Person *)person {
#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];