One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
struct Regex { | |
let pattern: String | |
let options: NSRegularExpressionOptions | |
private var matcher: NSRegularExpression { | |
return try! NSRegularExpression(pattern: pattern, options: options) | |
} | |
init(pattern: String, options: NSRegularExpressionOptions! = nil) | |
{ |
# ~/.gimp-*/gimprc | |
(default-snap-to-canvas yes) |
# ... | |
# Workaround for https://github.com/CocoaPods/CocoaPods/issues/1546 | |
post_install do |installer| | |
installer.aggregate_targets.each do |at| | |
files = at.user_targets.map{|t| | |
t.resources_build_phase.files_references.select{|f| | |
f.last_known_file_type == 'folder.assetcatalog' | |
}.map{|f| | |
Pathname.new(f.real_path).relative_path_from(f.project.path.dirname) |
$ mktmpenv | |
New python executable in tmp-f4732394b48189f9/bin/python | |
Installing setuptools............done. | |
Installing pip...............done. | |
This is a temporary environment. It will be deleted when you run 'deactivate'. | |
(tmp-f4732394b48189f9) sallah:~/.virtualenvs/tmp-f4732394b48189f9$ deactivate | |
Removing temporary environment: tmp-f4732394b48189f9 | |
Removing tmp-f4732394b48189f9... |
""" | |
base64's `urlsafe_b64encode` uses '=' as padding. | |
These are not URL safe when used in URL paramaters. | |
Functions below work around this to strip/add back in padding. | |
See: | |
https://docs.python.org/2/library/base64.html | |
https://mail.python.org/pipermail/python-bugs-list/2007-February/037195.html | |
""" |
// | |
// APAspectFitImageView.h | |
// autolayout | |
// | |
// Created by Antol Peshkov on 16.10.14. | |
// Copyright (c) 2014 Antol Peshkov. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
Suppose we want to add support for a new iOS 8 API in our framework that replaces an older iOS 7 API. There are a few problems we might face:
These three problems require three different technical solutions:
respondsToSelector:
)__IPHONE_OS_VERSION_MAX_ALLOWED
macrogit branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |