Skip to content

Instantly share code, notes, and snippets.

I have been raised by women. My single mother, my grandma, my godmother.

Markos Zoulias Charatzas qnoid

I have been raised by women. My single mother, my grandma, my godmother.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am qnoid on github.
  • I am qnoid ( on keybase.
  • I have a public key ASDnMYvBt96fg6Vw9BVDJpkZxLZg0PMq_k43V8xJz6EFbQo

To claim this, I am signing this object:

View response.json
"bookResponse": {
"bookId": "b7cb191fd0a62feb983be8817bc561a2",
"locale": "en_US",
"title": "Contacts Help",
"meta": {
"productVersion": "11.0",
"platformOSVersion": "10.13",
"icon": "",
"build_date": "Mon Nov 13 04:36:17 GMT 2017",
View app.js
var APP_VERSION = '1.0.21';
! function e(t, n, r) {
function i(a, l) {
if (!n[a]) {
if (!t[a]) {
var s = "function" == typeof require && require;
if (!l && s) return s(a, !0);
if (o) return o(a, !0);
var c = new Error("Cannot find module '" + a + "'");
throw c.code = "MODULE_NOT_FOUND", c
View app.css
button{background:0 0;border:0;box-sizing:content-box;color:inherit;cursor:pointer;font:inherit;line-height:inherit;overflow:visible;vertical-align:inherit}
qnoid / Process.swift
Last active Jul 16, 2017
Train of thought on how to design the idea of running a series of processes, lazily created, stopping execution early on first error.
View Process.swift
// 1
let process = Process()
// 2.
let process = Process()
let queue = DispatchQueue()
queue.async {
View optional.swift
guard let foo = foo else {
assertionFailure("This shouldn't happen")
qnoid / LocalAuthentication.swift
Last active May 25, 2016
How using an "Optional Pattern" alongside an "Enumeration Case Pattern" in Swift reduces the code it takes to match an optional AND an enum case at once while capturing its associated values.
View LocalAuthentication.swift
// MARK: - guard without Optional Pattern
extension LocalAuthentication {
convenience init?(authenticationLevel: AuthenticationLevel?){
guard let authenticationLevel = authenticationLevel else {
return nil
switch authenticationLevel {
qnoid / Avatar.swift
Last active Apr 10, 2016
Just trying to push the limits of Swift to see what's possible. Trying to get an overall understanding of how code can be structured. Especially around object life cycles. Check the revisions for iterations over the design. Please don't write code like this, unless you know what you are doing.
View Avatar.swift
struct Imager
unowned let session: Session
unowned let avatar: Avatar
func image(imageView: UIImageView) {
let download = { [weak imageView = imageView] (data, response, _) in
guard let _imageView = imageView else {
qnoid / ViewController.swift
Created Jan 22, 2016
In a capture list, there is no need to capture a reference to "self" if you need a reference to an instance self holds.
View ViewController.swift
class ViewController : UIViewController
var foo = "foo"
func hello()
let closure = { [foo =] in
print("Hello \(foo)!")
View AppDelegate.swift
class FooViewController: UIViewController
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let fooViewController = FooViewController()
let view = self.window!.snapshotViewAfterScreenUpdates(false)
let viewController = UIViewController()