Skip to content

Instantly share code, notes, and snippets.

View powerje's full-sized avatar

James Power powerje

View GitHub Profile
@powerje
powerje / Scanner.swift
Last active July 10, 2020 15:02
peekCharacter using Scanner in Swift
extension Scanner {
var peekCharacter: Character? {
if isAtEnd { return nil }
return string[fallbackAwareCurrentIndex]
}
private var fallbackAwareCurrentIndex: String.Index {
get {
if #available(iOS 13, macCatalyst 13, macOS 10.15, *) {
return currentIndex
@powerje
powerje / effective_modern_cmake.md
Created July 14, 2019 19:07 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@powerje
powerje / keybase.md
Created August 4, 2014 20:16
keybase.io

Keybase proof

I hereby claim:

  • I am powerje on github.
  • I am jep (https://keybase.io/jep) on keybase.
  • I have a public key whose fingerprint is D25D 42F1 A96A 0BB9 114D 976E 2BA9 4677 9F36 4F27

To claim this, I am signing this object: