Skip to content

Instantly share code, notes, and snippets.

View longvudai's full-sized avatar

Long Vu longvudai

View GitHub Profile
@longvudai
longvudai / UITabBarController+UINavigationController.swift
Last active December 4, 2018 19:43
preferredStatusBarStyle() to work within UINavigationController and UITabBarController
extension UITabBarController {
open override var childForStatusBarStyle: UIViewController? {
return selectedViewController
}
}
extension UINavigationController {
open override var childForStatusBarStyle: UIViewController? {
return visibleViewController
}
//
// ViewController.swift
// EventKit
//
// Created by Dai Long on 7/21/18.
// Copyright © 2018 Dai Long. All rights reserved.
//
import UIKit
import EventKit
@longvudai
longvudai / dedict.c
Created March 27, 2018 10:38 — forked from josephg/0dedict.py
Apple dictionaries
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "zlib.h"
#define CHUNK 16384
/*
40 Length of the zlib stream