Skip to content

Instantly share code, notes, and snippets.

View scrobot's full-sized avatar

Alex Scrobot scrobot

View GitHub Profile
rsocket==0.4.9
pydantic==1.10.7
aiohttp==3.8.4
@scrobot
scrobot / Hack to fix meteor.js on windows
Created April 24, 2022 05:18
Hack to fix meteor.js on windows
https://github.com/meteor/meteor/issues/10930#issuecomment-630721277
C:\Users\USER\AppData\Local\.meteor\packages\meteor-tool\1.10.2\mt-os.windows.x86_64\tools\fs\file.js
and deleted:
sourcemapConsumer.destroy(); on line number 1188.
This solved the problems for me. There is also a linker.js file that was causing some issues so I also did the same there:
@scrobot
scrobot / Main.java
Created May 17, 2021 08:03
NBA parsing
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class Main {
static String resultSheet1 = "Los Angeles Clippers 104 Dallas Mavericks 88,New York Knicks 101 Atlanta Hawks 112,Indiana Pacers 103 Memphis Grizzlies 112,"
+ "Los Angeles Lakers 111 Minnesota Timberwolves 112,Phoenix Suns 95 Dallas Mavericks 111,Portland Trail Blazers 112 New Orleans Pelicans 94,"
+ "Sacramento Kings 104 Los Angeles Clippers 111,Houston Rockets 85 Denver Nuggets 105,Memphis Grizzlies 76 Cleveland Cavaliers 106,"
/**
* @author Alex Scrobot
*/
public class Testy {
public static void main(String[] args) {
Testy testy = new Testy();
testy.switchMap();
testy.switchMap2();
}
@scrobot
scrobot / MainActivityPresenter.java
Last active April 24, 2019 10:01
Country flags in unicode
private void loadAllData(){
compositeDisposable.add(retrofitInterface
.getAllCountries()
.flatMap((countries) -> {
writeToRealm(countries);
return Observable.fromIterable(countries);
})
.flatMap((country) -> loadFlags(country.getFlag(), countries.getName()))
.subscribeOn(Schedulers.io())
@scrobot
scrobot / main.dart
Last active April 19, 2019 03:55
private setters hack in dart
class ViewState {
int _state = 0;
int get state => _state;
void increment() {
_changeState();
}
@scrobot
scrobot / AdapterDelegation.kt
Last active November 20, 2018 09:15
Adapter delegation
import android.support.v7.widget.RecyclerView
import android.view.ViewGroup
/**
* Created by alexscrobot on 28.11.17.
*/
abstract class DelegateAdapter<in T, K : AbstractViewHolder<T>>(val layout: Int): RecyclerView.Adapter<K>() {
private val list = mutableListOf<T>()
@scrobot
scrobot / docker-compose.yaml
Last active November 2, 2018 15:12
Jira and Confluence deployment
version: '2'
services:
jira:
depends_on:
- postgresql
image: blacklabelops/jira
networks:
- jiranet
volumes:
package com.letundra.global.ui.dialogs
import android.app.Dialog
import android.content.Context
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.support.annotation.LayoutRes
import android.support.v4.content.ContextCompat
import android.util.TypedValue
import android.view.WindowManager
package com.letundra.business.network
import android.app.Service
import android.content.Context
import android.content.Intent
import android.net.ConnectivityManager
import android.os.IBinder
import com.letundra.global.ErrorHandler
import com.letundra.global.extentions.computation
import io.reactivex.Flowable
import io.reactivex.disposables.CompositeDisposable