Skip to content

Instantly share code, notes, and snippets.

View avdyushin's full-sized avatar

Grigory Avdyushin avdyushin

View GitHub Profile
@avdyushin
avdyushin / DisplayLink.swift
Last active June 4, 2019 08:08 — forked from CanTheAlmighty/DisplayLink.swift
DisplayLink for OSX
@avdyushin
avdyushin / GIF-Screencast-OSX.md
Created September 19, 2018 08:08 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@avdyushin
avdyushin / XCTestCase+Expectation.swift
Last active December 1, 2016 10:59 — forked from cgoldsby/XCTestCase+Expectation.swift
XCTestCase extension with boilerplate code for unit testing async functions (waiting for expectations)
//
// AsyncTests.swift
//
import XCTest
// MARK: Async Helper Extension
extension XCTestCase {
@avdyushin
avdyushin / swift-kvo-example.swift
Created June 21, 2016 14:37 — forked from correia/swift-kvo-example.swift
A quick example for how to use Foundation style KVO from Swift. (Official documentation from Apple is forthcoming.)
//
// Swift-KVO
//
// Created by Jim Correia on 6/5/14.
// Copyright (c) 2014-2015 Jim Correia. All rights reserved.
//
// Update: 6/17/2014
//
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context
//
@avdyushin
avdyushin / string.swift
Last active May 27, 2016 09:23
Swift extension for string manipulation
//
// String 1.0
// Created by Caleb Hess on 2/22/16.
//
public extension String {
public var count: Int {
return self.characters.count
}