This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| import os.path as path | |
| import string | |
| import argparse | |
| import glob | |
| import re | |
| def basename(filename): | |
| base = filename | |
| if filename.find('@2x') > 0: | |
| base = filename[:filename.find('@2x')] |
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| // PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> |
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
| #include <llvm/Option/ArgList.h> | |
| #include <llvm/Option/Arg.h> | |
| #include <clang/Driver/Options.h> | |
| #include <llvm/Option/OptTable.h> | |
| #include <llvm/Support/raw_ostream.h> | |
| #include <memory> | |
| using namespace llvm; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Dirty script to check if any forks in ahead of master and open that branch commitlist | |
| Warning: Uses alot of api calls | |
| """ | |
| import requests | |
| from requests.auth import HTTPBasicAuth |
| user web; | |
| # One worker process per CPU core. | |
| worker_processes 8; | |
| # Also set | |
| # /etc/security/limits.conf | |
| # web soft nofile 65535 | |
| # web hard nofile 65535 | |
| # /etc/default/nginx |
| #!/usr/bin/env bash | |
| [ ! -x swift/utils/build-script ] && exit 1 | |
| SNAPSHOT_DATE=`date "+%Y-%m-%d"` | |
| HASH_LLVM=`(cd llvm;git rev-parse --short HEAD)` | |
| HASH_CLANG=`(cd clang;git rev-parse --short HEAD)` | |
| HASH_SWIFT=`(cd swift;git rev-parse --short HEAD)` | |
| HASH_INFO="LLVM ${HASH_LLVM}, Clang ${HASH_CLANG}, Swift ${HASH_SWIFT}" | |
| BUNDLE_IDENTIFIER="io.nor.swift.${SNAPSHOT_DATE}" # "CFBundleIdentifier for xctoolchain info plist" |
| py_binary( | |
| name = 'generate_compile_command', | |
| srcs = [ | |
| 'generate_compile_command.py', | |
| ], | |
| deps = [ | |
| '//third_party/bazel:extra_actions_proto_py', | |
| ], | |
| ) |
What are Lenses? Great explanation by @mbrandonw
Files:
input.swift - sample structs for which we want helpers to be generatedlens.stencil - sourcery template to generate lenses helpersoutput.swift - sample lenses helpers generatedzLens.swift - simple implementation of lenses, so you can play with itHints: