Skip to content

Instantly share code, notes, and snippets.


Ilya Eremin IlyaEremin

  • Flatstack
  • Kazan
Block or report user

Report or block IlyaEremin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
IlyaEremin / app_version.gradle
Last active Nov 14, 2019
Npm version for gradle
View app_version.gradle
def getVersionName = { getVersionProps()['appVersionName'] }
def getVersionProps() {
def versionPropsFile = file('')
if (!versionPropsFile.exists()) {
def versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps
IlyaEremin / big.json
Created Mar 5, 2017
Json for experiments
View big.json
This file has been truncated, but you can view the full file.
"_id": "58acbe62d2cc022efd9f1d32",
"index": 0,
"guid": "d6fffee6-9f05-43e0-83fa-7b5f27ac7e95",
"isActive": true,
"balance": "$2,360.24",
"picture": "",
"age": 34,
IlyaEremin / build.gradle
Created Feb 18, 2017
Example of managing dependencies in separate file
View build.gradle
apply from: 'deps.gradle'
// ...
dependencies {
compile supportLibs
compile rxJavaLibs
compile retrofitLibs
compile okHttpLibs
IlyaEremin / PushText.php
Created Apr 21, 2016
Push notification test code
View PushText.php
// API access key from Google API's Console
$registrationIds = array("YOUR_DEVICE_TOKEN");
// prep the bundle
$msg = array
package controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.Map;
* Created by user on 06.04.2016.
IlyaEremin /
Last active May 5, 2016
SearchBox back button bugfix
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
import com.quinny898.library.persistentsearch.SearchBox;
@Provides @CacheDir File provideCacheDir(Context context) {
File f = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
? context.getExternalCacheDir()
: context.getCacheDir();
if (f != null) {
return f;
IlyaEremin / news_details
Created Jun 15, 2015
webView with NestedScrollView height bug (on samsung s3 4.3)
View news_details
public class NewsDetailsFragment extends Fragment {
private String html = "<html><body>\\u003cp\\u003e\\u0026nbsp;\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eКоманда Александра Хацкевича уступила действующим чемпионам Европы с минимальным счетом 0:1. Единственный гол испанцы забили на 45-й минуте усилиями Давида Сильвы.\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eПолузащитник \\u0026laquo;Рубина\\u0026raquo; Сергей Кисляк вышел на поле в стартовом составе и был заменен на 78-й минуте встречи.\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp\\u003eТакже накануне сборная России на \\u0026laquo;Открытие Арена\\u0026raquo; в Москве с таким же счетом проиграла сборной Австрии. Футболисты \\u0026laquo;Рубина\\u0026raquo; Сергей Рыжиков, Эльмир Набиуллин и Магомед Оздоев на поле так и не появились.\\u0026nbsp;\\u003c/p\\u003e\\r\\n\\r\\n\\u003cp style=\\\"text-align:right\\\"\\u003eФото:\\u0026nbsp;\\u003ca href=\\\"
View Requests sequence
public class SignUpScreen extends BaseFragment{
private void signUp(RegistrationInfo regInfo) {
.flatMap(registerResponse -> api.getToken("password", userName, password, Consts.CLIENT_ID, Consts.CLIENT_SECRET))
.flatMap(token -> {
return api.getProfileInfo(Consts.SELF);
IlyaEremin / gist:8b0b120b1530443368f9
Last active Aug 29, 2015
jackson generic object wrapper ohohohoho!!!
View gist:8b0b120b1530443368f9
public class Wrapper<T> {
public Wrapper(){}
protected Map<String, T> map = new HashMap<>();
@JsonAnySetter public void set(String name, T t) {
map.put(name, t);
You can’t perform that action at this time.