This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.10 | |
ARG SPARK_VERSION=3.0.0-preview | |
ARG HADOOP_VERSION_SHORT=3.2 | |
ARG HADOOP_VERSION=3.2.0 | |
ARG AWS_SDK_VERSION=1.11.375 | |
RUN apk add --no-cache bash openjdk8-jre python3 | |
# Download and extract Spark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ivy.`dev.zio::zio:1.0.0-RC8-12` | |
import $ivy.`dev.zio::zio-streams:1.0.0-RC8-12` | |
import zio._, zio.stream._ | |
object Step1 { | |
import java.nio.file.{Files, Paths, Path} | |
import scala.collection.JavaConverters._ | |
import zio.blocking._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alamofire.request(urlString).responseJSON { response in | |
guard case let .failure(error) = response.result else { return } | |
if let error = error as? AFError { | |
switch error { | |
case .invalidURL(let url): | |
print("Invalid URL: \(url) - \(error.localizedDescription)") | |
case .parameterEncodingFailed(let reason): | |
print("Parameter encoding failed: \(error.localizedDescription)") | |
print("Failure Reason: \(reason)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Functor<T> { | |
map<U>(f: (x: T) => U): Functor<U> | |
} | |
class Box<T> implements Functor<T> { | |
value: T | |
constructor(x: T) { | |
this.value = x | |
} | |
map<U>(f: (x: T) => U): Box<U> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Remove Android Studio from your macOs | |
dry_run=true | |
while getopts "f" opt; do | |
case $opt in | |
f) | |
dry_run=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <dlfcn.h> | |
static off_t lookupPrivateSymbol(const char *path, const char *symbol) | |
{ | |
// TODO: Parse the Mach-O file | |
NSTask *task = [[NSTask alloc] init]; | |
task.launchPath = @"/usr/bin/nm"; | |
task.arguments = @[@"-a", @(path)]; | |
NSPipe *outputPipe = [NSPipe pipe]; | |
task.standardOutput = outputPipe; |