Skip to content

Instantly share code, notes, and snippets.

View mtavkhelidze's full-sized avatar
🇬🇪
OOP is an exceptionally bad idea which could only have originated in California.

Misha Tavkhelidze mtavkhelidze

🇬🇪
OOP is an exceptionally bad idea which could only have originated in California.
View GitHub Profile
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
@mtavkhelidze
mtavkhelidze / MapReduce.scala
Created February 14, 2023 11:26 — forked from iravid/MapReduce.scala
Map-Reduce with ZIO
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._
@mtavkhelidze
mtavkhelidze / Alamofire.request.error.handling.swift
Created July 21, 2019 15:39 — forked from perlguy99/Alamofire.request.error.handling.swift
Alamofire Request Error Handling - From their documentation
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)")
@mtavkhelidze
mtavkhelidze / example.ts
Created January 22, 2019 09:23 — forked from lierdakil/example.ts
An example of Functor in TypeScript. You can run this on https://www.typescriptlang.org/play/
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> {
@mtavkhelidze
mtavkhelidze / remove_android_studio.sh
Last active October 25, 2017 06:40 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
#!/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
@mtavkhelidze
mtavkhelidze / example.m
Last active August 27, 2016 09:48 — forked from jakepetroules/example.m
Drawing animated focus rings in Cocoa
#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;