Skip to content

Instantly share code, notes, and snippets.

View AlexBlokh's full-sized avatar
🏠
Working from home

Aleksandr Blokh AlexBlokh

🏠
Working from home
View GitHub Profile
@AlexBlokh
AlexBlokh / RatioViewPager.java
Last active March 31, 2017 11:36
ViewPager with custom aspect ratio
public class RatioViewPager extends ViewPager {
private float mRatio = 1f;
public RatioViewPager(Context context) {
super(context);
}
public RatioViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
@AlexBlokh
AlexBlokh / DrawableFadeInFactory.java
Created September 22, 2017 13:21
RoundedImageDrawable + Glide 4+
public class DrawableFadeInFactory implements TransitionFactory<Drawable> {
private final int duration;
private DrawableFadeInTransition resourceTransition;
protected DrawableFadeInFactory(int duration) {
this.duration = duration;
}
@Override
public Transition<Drawable> build(DataSource dataSource, boolean isFirstResource) {
@AlexBlokh
AlexBlokh / sequence
Created September 24, 2017 08:09
How to install zsh for Hyper on macOs
brew install zsh
brew install zsh-autocomplete
open ~/.hyper.js and find 'shell' and assign 'zsh' to it. You can also open 'hyper.js' in Hyper app by pressing cmd+','
@AlexBlokh
AlexBlokh / hello.go
Last active December 31, 2020 17:42
package main
import (
"fmt"
"time"
)
func main() {
for true {
fmt.Println("Hello !!")