Skip to content

Instantly share code, notes, and snippets.

View tieorange's full-sized avatar
👨‍💻
Developing mobile apps

Andrii Kovalchuk tieorange

👨‍💻
Developing mobile apps
View GitHub Profile
@tieorange
tieorange / .gitignore
Created April 21, 2022 07:36
Flutter multi platfrom ignore
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
@tieorange
tieorange / TodoListApp.dart
Last active October 27, 2020 13:09
TodoListApp flutter
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
// DTO
import android.content.Context;
import android.text.Layout.Alignment;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
/**
* Text view that auto adjusts text size to fit within the view.
@tieorange
tieorange / .zshrc
Created August 21, 2019 13:25
ZSH backup
GNU nano 2.0.6 File: .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export ANDROID_HOME=/Users/tieorange/Android
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=/Users/tieorange/flutter/bin:$PATH
alias python='python3'
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
@tieorange
tieorange / Brewfile
Created August 21, 2019 13:18
Brew backup August 2019
tap "dart-lang/dart"
tap "heroku/brew"
tap "holgerbrandl/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
brew "autojump"
brew "python"
brew "awscli"
# Go path
export PATH=$PATH:/usr/local/opt/go/libexec/bin
source kvm.sh
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
package com.westwingnow.android.utils;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
@tieorange
tieorange / ThrottledOnClickListener.kt
Last active September 18, 2023 07:03
A debounced onClickListener for Android
package com.westwingnow.android.utils
import android.os.SystemClock
import android.view.View
import java.util.*
/**
* A Throttled OnClickListener
* Rejects clicks that are too close together in time.
* This class is safe to use as an OnClickListener for multiple views, and will throttle each one separately.
import io.reactivex.ObservableTransformer
import io.reactivex.ObservableTransformer
object RxUtil {
private val LOADING_MESSAGE = "Loading"
fun <T> applyUIDefaults(rxFragment: RxFragment): ObservableTransformer<T, T> {
open class ErrorHandler(
private val errorDisplay: ErrorDisplay,
private val logger: Logger,
private val navigation: Navigation,
private val signOutUserUseCase: SignOutUserUseCase
) {
open fun handleError(tag: String, error: Throwable, retryAction: ((View) -> Unit)? = null) {
logger.logError(tag, error)