Skip to content

Instantly share code, notes, and snippets.

View tfedyanin's full-sized avatar

Fedyanin Timofey tfedyanin

View GitHub Profile
import SwiftUI
struct FullWidthImageView: View {
var body: some View {
VStack {
Image(systemName: "trash")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 200)
.contextMenu(ContextMenu {
@tfedyanin
tfedyanin / Complex VIew
Created February 9, 2020 19:27
Context menu problem
//
// AdCardView.swift
// dr-haus-front-swift
//
// Created by Тимофей Федянин on 22.01.2020.
// Copyright © 2020 Тимофей Федянин. All rights reserved.
//
import Foundation
import SwiftUI
@tfedyanin
tfedyanin / demo.rest
Last active July 5, 2019 12:37
DR-HAUS Sign up/in example

### Register

POST {{url}}/api/v0/authorize/signup

Content-Type: application/json

{

"name": "Test Testov",

"username": "tester",

@tfedyanin
tfedyanin / pomGeneratorForGradle.java
Last active November 23, 2017 19:06
pom generator
/**
* Generate default pom, considerate exclusion rules. For transitive dependencies exclude all
*
* @param confs for dependencies acquisition
* @return action as argument in maven-publish publication in method pom.withXml
*/
public static Action<XmlProvider> getPomAction(Configuration... confs) {
return xml -> {
Object dependencies = xml.asNode().get("dependencies");
if (dependencies != null && dependencies instanceof NodeList) {
@tfedyanin
tfedyanin / making-zeppelin-work-on-windows.md
Created October 29, 2017 17:52 — forked from codspire/making-zeppelin-work-on-windows.md
Making Zeppelin, Spark, pyspark work on Windows

Zeppelin, Spark, PySpark Setup on Windows (10)

I wish running Zeppelin on windows wasn't as hard as it is. Things go haiwire if you already have Spark installed on your computer. Zeppelin's embedded Spark interpreter does not work nicely with existing Spark and you may need to perform below steps (hacks!) to make it work. I am hoping that these will be fixed in newer Zeppelin versions.

If you try to run Zeppelin after extracting the package, you might encounter "The filename, directory name, or volume label syntax is incorrect."

Google search landed me to https://issues.apache.org/jira/browse/ZEPPELIN-1584, this link was helpful but wasn't enough to get Zeppelin working.

Below is what I had to do to make it work on my Windows 10 computer.

@tfedyanin
tfedyanin / making-zeppelin-work-on-windows.md
Created October 29, 2017 17:52 — forked from codspire/making-zeppelin-work-on-windows.md
Making Zeppelin, Spark, pyspark work on Windows

Zeppelin, Spark, PySpark Setup on Windows (10)

I wish running Zeppelin on windows wasn't as hard as it is. Things go haiwire if you already have Spark installed on your computer. Zeppelin's embedded Spark interpreter does not work nicely with existing Spark and you may need to perform below steps (hacks!) to make it work. I am hoping that these will be fixed in newer Zeppelin versions.

If you try to run Zeppelin after extracting the package, you might encounter "The filename, directory name, or volume label syntax is incorrect."

Google search landed me to https://issues.apache.org/jira/browse/ZEPPELIN-1584, this link was helpful but wasn't enough to get Zeppelin working.

Below is what I had to do to make it work on my Windows 10 computer.

git clone <git repository A url>
cd <git repository A directory>
git remote rm origin
git filter-branch --subdirectory-filter <directory 1> -- --all
git remote add origin <git repository B url>
git push --set-upstream origin master
git clone <git repository A url>
cd <git repository A directory>
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <directory 1> -r' --prune-empty --tag-name-filter cat -- --all