See also: UIApplicationDelegate documentation
// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,| ## Ubuntu 15.04 – Configure your system to have x11vnc running at startup. ## | |
| Hello World, | |
| If you are following us, you probably remember that we wrote already a post about this topic | |
| (see Ubuntu 14.10 – Configure your sytem to have x11vnc running at startup). | |
| Since Ubuntu 15.04 is using systemd, the instructions found in the previous post are not applicable anymore. | |
| Some of our readers had issues after upgrading to Ubuntu 15.04. | |
| The x11VNC is not running at startup anymore. |
See also: UIApplicationDelegate documentation
// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,| #!/bin/bash | |
| sources="https://github.com/CocoaPods/Specs.git" | |
| podRepo="INSERT YOUR PRIVATE POD REPO HERE" | |
| echo "--------tag list--------" | |
| git tag -l | |
| echo "--------tag list--------" | |
| // | |
| // MakeTransparentHoleOnOverlayView.swift | |
| // | |
| // Created by James Laurenstin on 2015-04-10. | |
| // Copyright (c) 2015 Aldo Group Inc. All rights reserved. | |
| // | |
| import UIKit | |
| class MakeTransparentHoleOnOverlayView: UIView { |
| #!/bin/zsh | |
| whitelist="master|main|dev|develop" | |
| git fetch --prune | |
| if [ -z "$1" ]; then | |
| list=$(git branch --merged | egrep -v "(^\*|$whitelist)") && | |
| cmd='echo "$list" | xargs -n 1 git branch -d' | |
| else | |
| list=$(git branch -r --merged | grep "$1" | egrep -v "(>|$whitelist)") && | |
| cmd='echo "$list" | cut -d'/' -f2- | xargs -n 1 git push "$1" --delete' |
| # although StackOverflow has this answer http://stackoverflow.com/a/1128583 | |
| # but that code is unreadable, thus I have this (also based on a SO anower: http://stackoverflow.com/a/1128721 ) | |
| # get the name of the branch we are on | |
| _git_repo_name() { | |
| gittopdir=$(git rev-parse --git-dir 2> /dev/null) | |
| if [[ "foo$gittopdir" == "foo.git" ]]; then | |
| echo `basename $(pwd)` | |
| elif [[ "foo$gittopdir" != "foo" ]]; then | |
| echo `dirname $gittopdir | xargs basename` |
| http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4 | |
| Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. | |
| Remove all its contents because there's a bug where Xcode will run an old version of your project that's in there somewhere. | |
| (Xcode 4.2 will show you the Derived Data folder: choose Window > Organizer and switch to the Projects tab. Click the right-arrow to the right of the Derived Data folder name.) | |
| In the simulator, choose iOS Simulator > Reset Content and Settings. | |
| Finally, for completeness, you can delete the contents of /var/folders; some caching happens there too. |
| # xcode-build-bump.sh | |
| # @desc Auto-increment the build number every time the project is run. | |
| # @usage | |
| # 1. Select: your Target in Xcode | |
| # 2. Select: Build Phases Tab | |
| # 3. Select: Add Build Phase -> Add Run Script | |
| # 4. Paste code below in to new "Run Script" section | |
| # 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
| # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
| # remove specific file from git cache | |
| git rm --cached filename | |
| # remove all files from git cache | |
| git rm -r --cached . | |
| git add . | |
| git commit -m ".gitignore is now working" |