Skip to content

Instantly share code, notes, and snippets.


Jan Rabe kibotu

Block or report user

Report or block kibotu

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
kibotu /
Last active Jun 26, 2019 — forked from zly394/
Overscroll AppBarLayout Behavior—— AppBarLayout越界弹性效果
package com.zly.widget.behavior;
* Created by zhuleiyue on 2017/3/7.
class AppBarLayoutOverScrollViewBehavior(context: Context?, attrs: AttributeSet?) : AppBarLayout.Behavior(context, attrs) {
private var targetHeight = 500f
kibotu / DataSource.kt
Created Jun 13, 2019
Generic Repository Interface
View DataSource.kt
* Default interface for DAOs.
interface DataSource<T> {
fun all(): List<T>
fun readById(id: String): T
kibotu / Repository.kt
Created Jun 13, 2019
Generic Repository Interface
View Repository.kt
import androidx.lifecycle.LiveData
* Generic interface for working with [T]
interface Repository<T> {
* Gets all [T].
kibotu /
Created Jun 11, 2019 — forked from jk2K/
how to export realm database, work on Android 5.0+
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
View bg_save_gradient.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="">
android:startColor="@color/bg_save_top_gradient" />
View gist:27c5d665d19b9f782e6b4f26eff878b1
Originall From: Posted 2015-05-29
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
kibotu / DeviceOrientation
Created Apr 23, 2019 — forked from Abdelhady/DeviceOrientation
A utility class to help get current device orientation, you will need it if you decided to fix the activity's orientation in the manifest :)
View DeviceOrientation
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
* Created by abdelhady on 9/23/14.
* to use this class do the following 3 steps in your activity:
kibotu / IRepository.cs
Created Mar 21, 2019
Simple Repository
View IRepository.cs
using System;
using System.Collections.Generic;
using System.Linq;
public interface IRepository<T>
T Create();
void Add(T item);
kibotu / PageBaseFragment.kt
Created Mar 21, 2019
Visibility hint on viewpager
View PageBaseFragment.kt
import android.os.Bundle
import net.kibotu.swipedirectionviewpager.SwipeDirection
import net.kibotu.swipedirectionviewpager.ViewPagerPresenterAdapter
abstract class PageBaseFragment : BaseFragment(), ViewPagerPresenterAdapter.ViewPagerPresenter<Any, Any> {
// region ViewPagerPresenterAdapter.ViewPagerPresenter
override var viewPagerPresenterAdapter: ViewPagerPresenterAdapter<Any, Any>? = null
kibotu /
Last active Mar 20, 2019
adb shell register
#!/usr/bin/env bash
adb shell input text ""
adb shell input keyevent 66 # 66 = KEYCODE_ENTER
adb shell input text ""
adb shell input keyevent 66
adb shell input text "123456789"
adb shell input text "pwd"
You can’t perform that action at this time.