Skip to content

Instantly share code, notes, and snippets.

View rozag's full-sized avatar

Alexey Mileev rozag

  • Earth
View GitHub Profile
@rozag
rozag / purge-dot-idea.sh
Created March 10, 2019 13:33
Script to drop a bunch of Intellij IDEA caches
#!/usr/bin/env bash
set -x
rm -rv .idea/caches
rm -rv .idea/libraries
rm -v .idea/gradle.xml
rm -v .idea/modules.xml
@rozag
rozag / sticker.txt
Created March 4, 2019 13:21
@shitty_android PeerLab sticker idea
____________
| itty |
| android |
| peerlab |
| ./sh |
‾‾‾‾‾‾‾‾‾‾‾‾
@rozag
rozag / feeds-news.json
Last active March 2, 2021 13:57
News source for the rss-tg-chan project.
{
"feeds": [
"http://umneem.org/index.xml",
"https://nplus1.ru/rss",
"https://nplusonemag.com/feed/",
"http://disgustingmen.com/feed/",
"http://gorky.media/feed/",
"https://thenextweb.com/feed/"
]
}
@rozag
rozag / feeds-tech.json
Last active March 4, 2024 11:50
Tech source for the rss-tg-chan project.
{
"feeds": [
"https://medium.com/feed/android-news",
"http://akarnokd.blogspot.com/feeds/posts/default",
"http://feeds.feedburner.com/GoogleOpenSourceBlog",
"http://feeds.feedburner.com/BenNorthrop",
"http://os.phil-opp.com/atom.xml",
"http://dev.cheremin.info/feeds/posts/default",
"http://feeds.feedburner.com/blogspot/hsDu",
"http://ruhaskell.org/feed.xml",
@rozag
rozag / BenchmarkUtil.java
Last active July 5, 2018 11:48
A dummy benchmark helper
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public final class BenchmarkUtil {
private static final List<Long> TIMES = new ArrayList<>(10);
private static long startNanos;
@rozag
rozag / SingleEventLiveData.java
Created June 6, 2018 16:45
A lifecycle-aware LiveData that sends only new updates after subscription, used for events like navigation and Snackbar messages.
/**
* A lifecycle-aware observable that sends only new updates after subscription, used for events like
* navigation and Snackbar messages.
* <p>
* This avoids a common problem with events: on configuration change (like rotation) an update
* can be emitted if the observer is active. This LiveData only calls the observable if there's an
* explicit call to setValue() or call().
* <p>
* Note that only one observer is going to be notified of changes.
*/
@rozag
rozag / Pair.java
Created June 6, 2018 11:06
An example of object pool implementation
public final class Pair {
public int firstValue;
public int secondValue;
// Reference to next object in the pool
private Pair next;
// The lock used for synchronization
private static final Object sPoolSync = new Object();
@rozag
rozag / keybase.md
Created April 19, 2017 15:50
Verifying myself on keybase.io

Keybase proof

I hereby claim:

  • I am rozag on github.
  • I am rozag (https://keybase.io/rozag) on keybase.
  • I have a public key ASARItueGmMr-u_4jpmjgnAWrp82xuI_vKQztwqAK3KADAo

To claim this, I am signing this object:

@rozag
rozag / KTouch-Slava-Kochetkov-RU.xml
Created November 1, 2016 14:54
Курс русской печати для KTouch от Славы Кочеткова, который я адаптировал к новой версии KTouch.
<?xml version="1.0"?>
<course>
<id>{d8abcd0f-44a9-44ab-b6a3-e06908041b7b}</id>
<title>Русская by Slava Kochetkov</title>
<description>Writing by Slava Kochetkov (slava@rejik.ru)</description>
<keyboardLayout>ru</keyboardLayout>
<lessons>
<lesson>
<id>{08ca1f8d-6ddc-4c50-a0ad-d3979b7716cf}</id>
<title>Level 1</title>
@rozag
rozag / index.html
Last active August 29, 2015 14:18
Conway's Game of Life
<!doctype html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Game of Life</title>
</head>
<canvas></canvas>
<script src="main.js"></script>