Skip to content

Instantly share code, notes, and snippets.

View Firsto's full-sized avatar
☄️
I may be slow to respond.

Roman Zaostrovsky Firsto

☄️
I may be slow to respond.
View GitHub Profile
@kristofferh
kristofferh / git-export
Created December 7, 2011 13:01
"Export" a git repository to zip file
git archive --format zip --output /full/path/to/zipfile.zip master
@granoeste
granoeste / EachDirectoryPath.md
Last active June 19, 2024 07:37
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories

@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@lapastillaroja
lapastillaroja / DividerItemDecoration.java
Last active November 17, 2023 23:06 — forked from akmalxxx/DividerItemDecoration.java
DividerItemDecoration. RecyclerView.ItemDecoration simple implementation
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
@mobiRic
mobiRic / Foreground.java
Last active May 26, 2016 12:51 — forked from steveliles/Foreground.java
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
/*
* Copyright (C) 2014 Steve Liles
* Copyright (C) 2014 Glowworm Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ValdikSS
ValdikSS / donotasktoask_ru.md
Last active December 30, 2022 17:54
Спрашивайте сразу

Вам отправили это сообщение по следующим возможным причинам:

  • Вы поприветствовались и ждете ответа
  • Вы спросили о том, можно ли задать вопрос, и ждете ответа
  • Вы скинули запрос авторизации и ждете ответа

Пожалуйста, не делайте так. Задавайте вопрос сразу, без прелюдий, без запросов авторизации (в том числе и в Jabber), и ждите ответа. Не повторяйте свой вопрос и не спрашивайте, на месте ли я.

Здесь комментарии не пишите, уведомление о них не приходит ни мне, ни вам.

Если вам интересно получить развернутый ответ и аргументы, почему не стоить здороваться и ожидать ответа при общении онлайн:

Git Cheat Sheet

Commands

Getting Started

git init

or

@poxu
poxu / java_urls.txt
Last active January 9, 2022 10:24
Ссылки на русскоязычные видео о java
##1. Вопросы оптимизации и производительности
###1.1 Производительность и оптимизация
#Сергей Куксенко, Oracle — Железные счётчики на страже производительности
https://www.youtube.com/watch?v=RlX0f9pzhtc
#Алексей Шипилёв, Oracle — Катехизис java.lang.String
#о реализации строк в Java, способы оптимизации работы со строками и ошибки, которые часто допускают при оптимизации работы со строками,
https://www.youtube.com/watch?v=SZFe3m1DV1A
@nisrulz
nisrulz / grayscale_imageview.java
Created December 25, 2015 05:52
Apply grayscale filter to ImageView in android
ImageView imgview = (ImageView)findViewById(R.id.imageView_grayscale);
imgview.setImageBitmap(bitmap);
// Apply grayscale filter
ColorMatrix matrix = new ColorMatrix();
matrix.setSaturation(0);
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix);
imgview.setColorFilter(filter);
import com.arellomobile.mvp.MvpView
import com.arellomobile.mvp.viewstate.ViewCommand
import com.arellomobile.mvp.viewstate.strategy.StateStrategy
class AddToEndSingleWithTagStrategy : StateStrategy {
override fun <View : MvpView> beforeApply(currentState: MutableList<ViewCommand<View>>,
incomingCommand: ViewCommand<View>) {
val iterator = currentState.iterator()