I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/- | |
- Definition of insertion sort. | |
- Copyright Siva Somayyajula, 2017 | |
-/ | |
namespace list | |
universe u | |
variable {α : Type u} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A script to update your /etc/hosts file from minikube ingest records | |
# | |
# Installation | |
# ------------ | |
# curl -L https://gist.github.com/jacobtomlinson/4b835d807ebcea73c6c8f602613803d4/raw/minikube-update-hosts.sh > /usr/local/bin/minikube-update-hosts | |
# chmod +x /usr/local/bin/minikube-update-hosts | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var glob = require('glob'); | |
var fs = require('fs'); | |
var replace = require('replace'); | |
// Find file(s) | |
glob('fileName.txt', function(err, files) { | |
if (err) { throw err; } | |
files.forEach(function(item, index, array) { | |
console.log(item + ' found'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static UIView *PSPDFViewWithSuffix(UIView *view, NSString *classNameSuffix) { | |
if (!view || classNameSuffix.length == 0) return nil; | |
UIView *theView = nil; | |
for (__unsafe_unretained UIView *subview in view.subviews) { | |
if ([NSStringFromClass(subview.class) hasSuffix:classNameSuffix]) { | |
return subview; | |
}else { | |
if ((theView = PSPDFViewWithSuffix(subview, classNameSuffix))) break; | |
} |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \