Skip to content

Instantly share code, notes, and snippets.

View AnatoliyOstapenko's full-sized avatar

Anatoliy Ostapenko AnatoliyOstapenko

  • IT Innovations
  • Kyiv, Ukraine
View GitHub Profile
@lattner
lattner / TaskConcurrencyManifesto.md
Last active June 29, 2024 14:26
Swift Concurrency Manifesto
@alexkafer
alexkafer / LongRunning.swift
Created August 15, 2016 12:57
A simple swift timer program that runs in Xcode Playground
import UIKit
class MyClass {
func startTimer() {
NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: #selector(MyClass.onTimer(_:)), userInfo: nil, repeats: false)
}
@objc func onTimer(timer:NSTimer!) {
print("Timer here")
@maxcampolo
maxcampolo / ViewController+IsVisible.swift
Created June 13, 2016 15:21
Check if a UIViewController is currently visible.
extension UIViewController {
func isVisible() -> Bool {
return self.isViewLoaded() && self.view.window != nil
}
}
@manjeettahkur
manjeettahkur / kata01.js
Last active February 10, 2024 08:20
Given the triangle of consecutive odd numbers
Description:
Given the triangle of consecutive odd numbers:
1
3 5
7 9 11
13 15 17 19
21 23 25 27 29
...