Skip to content

Instantly share code, notes, and snippets.

@yichizhang
yichizhang / count_source_code_lines
Created May 8, 2016 06:35
Count the lines of Swift and Objective-C code in a directory recursively
# Count the lines of Swift and Objective-C code in a directory recursively
# - Find files recursively with extension 'swift', 'h' or 'm'
# - Add double quotes around the files in case the path contains spaces
# - Use wc to count the number of lines
# - Sort the out put
find . -name '*.swift' -o -name '*.h' -o -name '*.m' | awk '{printf("\"%s\"\n", $0);}' | xargs wc -l | sort
@yichizhang
yichizhang / KeyboardViewController.swift
Created May 7, 2016 07:04
iOS9 Keyboard extension - Custom height keyboard
//
// KeyboardViewController.swift
// CustomHeightKeyboard
//
// Created by Yichi on 3/10/2015.
// Copyright (c) 2015-present Yichi. All rights reserved.
//
import UIKit