Bash (Bourne Again Shell) is the default command-line shell on many distributions. Zsh (Z Shell) is a powerful shell that operates as both an interactive shell and as a scripting language interpreter.
sudo apt install zsh
| Do this... | ...when you see this message | |
|---|---|---|
| ⌘B Build | ...<some long message>. Build again to continue. | |
| ⌘⇧K Clean | ...received multiple target ended messages for target ID... | |
| ⌘⇧K Clean | ...targetID (174) not found in _activeTargets... | |
| File > Packages > Resolve Package Versions | ...unable to load transferred PIF: The workspace contains multiple references with the same GUID PACKAGE:1YZON8U0E6OSQJJ6SVU... | |
| Close and reopen project (Clean will fail) | ...unknown error while handling message: unknownSession(handle: S0)... | |
| Restart Xcode (Clean will fail) | ...unknown error while handling message: MsgHandlingError(message: unable to initiate PIF transfer session (operation in progress?)) | |
| Restart Xcode | Clean failed. | |
| Quit the Simulator and re-run test/s | Failed to establish communication with the test runner. (Underlying Error: Simulator indicated unix domain socket for testmanagerd at path [...]/com.apple.testmanagerd.unix-domain.socket, but no file was found at that path.) |
Bash (Bourne Again Shell) is the default command-line shell on many distributions. Zsh (Z Shell) is a powerful shell that operates as both an interactive shell and as a scripting language interpreter.
sudo apt install zsh
| require 'fileutils' | |
| require 'optimist' | |
| require 'plist' | |
| def run(path, source_path) | |
| process(path, source_path, '**/*.app', true) | |
| process(path, source_path, '**/*.dylib', false) | |
| end | |
| def process(path, source_path, search_pattern, is_app) |
| // The issue with sectionHeadersPinToVisibleBounds and sectionFootersPinToVisibleBounds is that they do not pin | |
| // first header and last footer when bouncing. This layout subclass fixes that. | |
| class StickyLayout: UICollectionViewFlowLayout { | |
| override init() { | |
| super.init() | |
| self.sectionFootersPinToVisibleBounds = true | |
| self.sectionHeadersPinToVisibleBounds = true | |
| } |
| * Reducing executable size: | |
| http://developer.xamarin.com/guides/cross-platform/deployment,_testing,_and_metrics/memory_perf_best_practices/#Reducing_Executable_Size | |
| * Use the linker (iOS [1], Android [2]) to remove unnecessary code from your assemblies | |
| [1] https://developer.xamarin.com/guides/ios/advanced_topics/linker | |
| [2] https://developer.xamarin.com/guides/android/advanced_topics/linking | |
| * Reference third-party libraries judiciously | |
| * Applying constraints to generics may reduce app size, since less code would need to be included (haven’t verified this) |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main| // MARK: Using NSURLSession | |
| // Get first todo item | |
| let todoEndpoint: String = "http://jsonplaceholder.typicode.com/todos/1" | |
| guard let url = NSURL(string: todoEndpoint) else { | |
| print("Error: cannot create URL") | |
| return | |
| } | |
| let urlRequest = NSURLRequest(URL: url) |
| # Custom rspec matcher for testing CanCan abilities. | |
| # Originally inspired by https://github.com/ryanb/cancan/wiki/Testing-Abilities | |
| # | |
| # Usage: | |
| # should have_abilities(:create, Post.new) | |
| # should have_abilities([:read, :update], post) | |
| # should have_abilities({manage: false, destroy: true}, post) | |
| # should have_abilities({create: false}, Post.new) | |
| # should not_have_abilities(:update, post) | |
| # should not_have_abilities([:update, :destroy], post) |
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |