Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Aleksandr Blokh AlexBlokh

🏠
Working from home
  • 908
  • Ukraine, Dnipropetrovsk
View GitHub Profile
View hello.go
package main
import (
"fmt"
"time"
)
func main() {
for true {
fmt.Println("Hello !!")
@AlexBlokh
AlexBlokh / sequence
Created Sep 24, 2017
How to install zsh for Hyper on macOs
View sequence
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 / DrawableFadeInFactory.java
Created Sep 22, 2017
RoundedImageDrawable + Glide 4+
View DrawableFadeInFactory.java
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 / RatioViewPager.java
Last active Mar 31, 2017
ViewPager with custom aspect ratio
View RatioViewPager.java
public class RatioViewPager extends ViewPager {
private float mRatio = 1f;
public RatioViewPager(Context context) {
super(context);
}
public RatioViewPager(Context context, AttributeSet attrs) {
super(context, attrs);