Skip to content

Instantly share code, notes, and snippets.

View Fi5t's full-sized avatar
☝️
Every software architect is a developer but not every developer is an architect

Fi5t

☝️
Every software architect is a developer but not every developer is an architect
View GitHub Profile
#!/bin/bash
if [ -z "$1" ]
then
echo "You have to provide a required host ip addr to connect"
else
HOST=$1
fi
if [ -z "$2" ]
REM GENRE Electronica
REM DATE 2020
PERFORMER "MASTER BOOT RECORD"
TITLE "VirtuaVerse OST"
FILE "MASTER BOOT RECORD 'VirtuaVerse OST' [Full Album - Official]-u_1UF6MZGUM.mp3" MP3
TRACK 01 AUDIO
TITLE "VirtuaVerse"
PERFORMER "MASTER BOOT RECORD"
INDEX 01 00:00:00
TRACK 02 AUDIO
val moshi = Moshi.Builder()
.add(SkipBadListObjectsAdapterFactory())
.build()
...
fun onLoginButtonClick(login: String, password: String) {
...
authorizationUseCase.login(login, password)
.subscribe(
{ onLoginSuccess(it) },
{ onError(it) }
)
}
...
private fun processServerException(exception: ServerException) {
viewState.showError(exception.description)
when (exception.code) {
ErrorCode.INVALID_CREDENTIALS -> invalidCredentialsCallback()
ErrorCode.AUTHENTICATION_REQUIRED -> authenticationRequiredCallback()
ErrorCode.UNKNOWN -> unknownServerErrorCallback()
}
...
@CallSuper
open fun onError(throwable: Throwable) {
when (throwable) {
is HttpException -> {
val responseBody = throwable.response().errorBody().string()
try {
val serverException = parseError(responseBody)
processServerException(serverError)
@Fi5t
Fi5t / install_tmux_osx_no_brew
Last active July 24, 2019 07:33 — forked from shrayasr/OLD_OLD_OLD_install_tmux_osx_no_brew.html
Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
# Extract them
tar xzf tmux-2.3.tar.gz
#!/usr/bin/python
# It brings JDK8 to Android Studio
__author__ = 'Fi5t'
from plistlib import readPlist, writePlist
def set_jdk(plist, version):
#!/usr/bin/python
# -*- coding: UTF-8 -*-
__author__ = 'Fi5t'
from Tkinter import *
import subprocess
import io
import sys
import ConfigParser