Skip to content

Instantly share code, notes, and snippets.

Alexander von Below below

  • Deutsche Telekom AG
  • Köln, Germany
Block or report user

Report or block below

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
below /
Last active Jul 16, 2018 — forked from shinvou/
Build the macOS High Sierra (10.13.3) xnu kernel.
# This is more or less just a bash script for this tutorial:
# So, huge thanks to Mikal Villa! I updated the tarballs for macOS 10.13 and added line 29.
function checkError {
if [ $? -ne 0 ] ; then
echo "Script failed"
below / md
Created Apr 4, 2018
Watch Development Question
View md
**** Hokay ****
I have an existing project, which includes a Watch App. The main App and the Watch extension share some code.
Now (for reasons I will gladly explain but I ask you so simply presume as valid for now) some code is moving into a framework.
The shared code in the App and in the Extension is depending on (i.e. using) the code in the Framework.
Said Framework should be different for the App and the Watch (i.e. it must show different behavior), this is why don't want to build a universal Framework (I don't even know if that is possible). For simplicity however, the Pricipal Class of both Frameworks should be the same, so that the shared code in the App and the Watch can access the Framework the same way.
below / gist:ae461ff69141624494488fcfc9da4dc8
Last active Mar 3, 2017
gradlew task --info --debug --stacktrace
View gist:ae461ff69141624494488fcfc9da4dc8
15:41:57.007 [LIFECYCLE] [org.gradle.launcher.daemon.client.SingleUseDaemonClient] To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:
15:41:57.017 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Using daemon args: [/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java, -Xmx1536m, -Dfile.encoding=UTF-8,, -Duser.language=de, -Duser.variant, -cp, /Users/below/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1/lib/gradle-launcher-2.14.1.jar]
15:41:57.023 [INFO] [org.gradle.launcher.daemon.client.DefaultDaemonStarter] Starting daemon process: workingDir = /Users/below/.gradle/daemon/2.14.1, daemonArgs: [/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java, -Xmx1536m, -Dfile.encoding=UTF-8,, -Duser.language=de, -Duser.variant, -cp, /Users/below/.gradle/wrapper/dists/gradle-2.14.1-all/
View gist:6c96ad38447d418899f3498e54281e84
Error:Unable to find method 'org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
12:33 Gradle sync failed: Cause: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/Hostn
View Optional.swift
import Foundation
let scheme : String! = "https" // "https"
let host = "" // ""
let urlString = "\(scheme)://\(host)" // "Optional("https")://" // <-- WHAT?
let url = URL(string: urlString) // nil
below / ProtocolPlayground.swift
Created Nov 8, 2016
Why does this work if I test for the class, and not for the protocol?
View ProtocolPlayground.swift
//: Playground - noun: a place where people can play
import Foundation
protocol MyProtocol {
var value: Int! { get set }
class MyClass : MyProtocol {
var value : Int!
below / QueryPlayground.swift
Created Jul 26, 2016
Why is NSQueryItem not percent escaping "+" in a query?
View QueryPlayground.swift
import UIKit
let comps = NSURLComponents(string: "")
comps?.queryItems = [NSURLQueryItem(name: "foobar", value: "foo+bar&something else")]
// Actual result:
// As per it
// appears that '+' should be escaped. What am I overlooking?
View Universal URLs
So my universal URLs are not working.
In order to track down the problem, I checked the embedded.mobileprovision file. And here I find:
<!-- stuff -
below / NEHotspotEnum.playground
Created Mar 3, 2016
Why is the NEHotspotHelperConfidence not nil if out of bounds?
View NEHotspotEnum.playground
import UIKit
import NetworkExtension
//: First a classical enum. As documented, it will be nil if initialized with a rawValue outside of bounds
enum Foobar : Int {
case foo
case bar
below / gist:cfc8ac57458cce66b137
Created May 14, 2015
I should admit that I don't regularly work in ruby, so I am pretty stuck here. I am trying to download a https url using NET::HTTP:get, and I get this error. Downloading the URL in curl (even if called from the script) works just fine. What to do?
View gist:cfc8ac57458cce66b137
/Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:920:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:920:in `block in connect'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:920:in `connect'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:852:in `start'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:583:in `start'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:478:in `get_response'
from /Users/below/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:455:in `get'
from export.rb:4:in `<main>'
You can’t perform that action at this time.