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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 300, 200)]; | |
view.backgroundColor = [UIColor blueColor]; | |
[self.view addSubview:view]; | |
[view addObserver:self forKeyPath:@"frame" options:0 context:NULL]; |
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 <CommonCrypto/CommonCrypto.h> |
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
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[0;31m' | |
function usage() { | |
if [ -n "$1" ]; then | |
echo -e "${RED}👉 $1${CLEAR}\n"; | |
fi | |
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]" |
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
// | |
// ASN1.swift | |
// ASN1 | |
// | |
// Created by Håvard Fossli on 29.08.2018. | |
// Copyright © 2018 Håvard Fossli. All rights reserved. | |
// | |
import Foundation |
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 | |
import Cocoa | |
class NodeTask: NSObject { | |
private let processIdentifier = NSProcessInfo.processInfo().processIdentifier | |
private let nodeTask = NSTask() | |
private let readPipe = NSPipe() | |
private let errorPipe = NSPipe() | |
private let queue = dispatch_queue_create("NodeTask.output.queue", DISPATCH_QUEUE_SERIAL) |
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
// This is a heavily altered version of SHA2.swift found in CryptoSwift. | |
// I tried to remove everything that is not about SHA256. | |
// | |
// --========================================================================-- | |
// | |
// SHA2.swift | |
// CryptoSwift | |
// | |
// Created by Marcin Krzyzanowski on 24/08/14. |
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
#!/bin/bash | |
# Created by Håvard Fossli <hfossli@gmail.com> in 2013 | |
# This is free and unencumbered software released into the public domain. | |
# For more information, please refer to <http://unlicense.org/> | |
# | |
# Description | |
# A bash script for reversing videos using ffmpeg and sox. | |
# | |
# Keywords |
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
struct AutoID: Hashable { | |
private var parent: AnyHashable? | |
private var file: String | |
private var line: UInt | |
private var column: UInt | |
init(parent: AnyHashable? = nil, file: String = #file, line: UInt = #line, column: UInt = #column) { | |
self.parent = parent | |
self.file = file | |
self.line = line |
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 | |
import SwiftUI | |
struct SimpleTab<SelectionValue: Equatable & Hashable>: View, Identifiable { | |
var id: SelectionValue | |
var image: Image | |
var label: Text | |
var content: AnyView | |
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
on run argv | |
tell application "Mail" to activate | |
tell application "System Events" | |
keystroke "p" using command down | |
delay 2 | |
keystroke tab | |
keystroke tab |
NewerOlder