Skip to content

Instantly share code, notes, and snippets.

🤡
SEVERE RECTAL PAIN

Ilya Eremin IlyaEremin

🤡
SEVERE RECTAL PAIN
  • 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
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('gradle.properties')
if (!versionPropsFile.exists()) {
versionPropsFile.createNewFile()
}
def versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps
@IlyaEremin
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": "http://placehold.it/32x32",
"age": 34,
@IlyaEremin
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
IlyaEremin / PushText.php
Created Apr 21, 2016
Push notification test code
View PushText.php
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR_SERVER_API_KEY' );
$registrationIds = array("YOUR_DEVICE_TOKEN");
// prep the bundle
$msg = array
(
View HelloIlyaController.java
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
IlyaEremin / MySearchBox.java
Last active May 5, 2016
SearchBox back button bugfix
View MySearchBox.java
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
import com.quinny898.library.persistentsearch.SearchBox;
/**
View dagger.java
@Provides @CacheDir File provideCacheDir(Context context) {
File f = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
? context.getExternalCacheDir()
: context.getCacheDir();
if (f != null) {
f.mkdirs();
}
return f;
}
@IlyaEremin
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=\\\"http://ru.uefa.com/uefaeuro/qualifiers/season=2016/matches/round=2000446/match=2013962/postmatch/photos/index.h
View Requests sequence
public class SignUpScreen extends BaseFragment{
private void signUp(RegistrationInfo regInfo) {
startProgressAnimation();
bind(api.registerWith(regInfo)))
.flatMap(registerResponse -> api.getToken("password", userName, password, Consts.CLIENT_ID, Consts.CLIENT_SECRET))
.flatMap(token -> {
User.saveTokens(token);
return api.getProfileInfo(Consts.SELF);
})
@IlyaEremin
IlyaEremin / gist:8b0b120b1530443368f9
Last active Aug 29, 2015
jackson generic object wrapper ohohohoho!!!
View gist:8b0b120b1530443368f9
public class Wrapper<T> {
@JsonCreator
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.