Add these lines to register for keyboard notifications.
NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillShowNotification, object: nil)
| object Demo { | |
| // A couple of type classes with type members ... | |
| trait Foo[T] { | |
| type A | |
| } | |
| object Foo { | |
| implicit val fooIS = new Foo[Int] { type A = String } | |
| } |
| #!/bin/bash | |
| # Run as root or sudo the commands that need it as you go. | |
| # brew version 0.9.5 | |
| # Mac OS X 10.10.1 | |
| # A little bit changed version of this: | |
| # http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working |
| #!/bin/sh | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| # make sure the output directory exists | |
| mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
| # Step 1. Build Device and Simulator versions | |
| xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
| xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
| // | |
| // Free.swift | |
| // Swift_Extras | |
| // | |
| // Created by Robert Widmann on 9/19/14. | |
| // Copyright (c) 2014 Robert Widmann. All rights reserved. | |
| // | |
| import Foundation |
| /* | |
| test_ssl_fingerprint | |
| -------------------- | |
| This code shows the following: | |
| - use openssl to generate a private key that can be used to encrypt application data | |
| - extract the fingerprint from the key |
| scalaVersion := "2.11.1" | |
| libraryDependencies ++= Seq( | |
| "org.scalaz" %% "scalaz-core" % "7.1.0-M7" | |
| ) | |
| scalacOptions ++= Seq("-deprecation", "-language:_") |
| protocol Monad { | |
| typealias F | |
| typealias U | |
| class func bind<M : Monad where M.U == U>(Self, F -> M) -> M | |
| class func `return`(F) -> Self | |
| } | |
| extension Array : Monad { | |
| typealias F = T |
| 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 |
| http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
| # rpm | |
| wget --no-cookies \ | |
| --no-check-certificate \ | |
| --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
| "http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
| -O jdk-7-linux-x64.rpm | |
| # ubuntu |