This file contains hidden or 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
import LocalAuthentication | |
... | |
private func authenticateUser() { | |
let context = LAContext() | |
var error: NSError? | |
if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) { | |
let reason = "Identify yourself!" |
This file contains hidden or 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
// | |
// RoundedCornersView.swift | |
// | |
// Created by Jeroen Wesbeek on 24/11/16. | |
// Copyright © 2016 Jeroen Wesbeek. All rights reserved. | |
// | |
import Foundation | |
import UIKit | |
@IBDesignable class RoundedCornersView: UIView { |
This file contains hidden or 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
platform :ios, '9.0' | |
target 'Example' do | |
use_frameworks! | |
pod 'NameOfTheFramework', :path => "../" |
This file contains hidden or 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
// Disable AutoBoot | |
sudo nvram AutoBoot=%00 | |
// Enable AutoBoot | |
sudo nvram AutoBoot=%03 |
This file contains hidden or 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
// disable | |
sudo nvram BootAudio=%00 | |
// enable | |
sudo nvram BootAudio=%01 |
This file contains hidden or 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
// Swift 2.3 | |
for symbol: String in NSThread.callStackSymbols() { | |
print(symbol) | |
} | |
// Swift 3 | |
for symbol: String in Thread.callStackSymbols { | |
print(symbol) | |
} |
This file contains hidden or 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
// | |
// ImageCaptureManager.swift | |
// ImageCapture | |
// | |
// Created by Jeroen Wesbeek on 29/07/16. | |
// Copyright © 2016 Jeroen Wesbeek. All rights reserved. | |
// | |
import Foundation | |
import AVFoundation |
This file contains hidden or 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
<?xml version="1.0"?> | |
<root> | |
<!-- | |
private.xml for Karabiner | |
download at https://pqrs.org/osx/karabiner | |
//--> | |
<devicevendordef> | |
<vendorname>BELKIN</vendorname> |
This file contains hidden or 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
curl -s https://gist.githubusercontent.com/4np/8284565/raw/c6194631247756a4736d567bd0b7b9ce9199644f/install-commit-hook.sh|/bin/sh |
This file contains hidden or 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/sh | |
# get global git template dir | |
if [ `git config --global init.templatedir` ]; then | |
TEMPLATE_DIR=`git config --global init.templatedir` | |
else | |
# there is no git template dir yet, set it | |
git config --global init.templatedir ~/.git | |
TEMPLATE_DIR=~/.git | |
fi |