Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Jan Rabe kibotu

:octocat:
Focusing
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
kibotu / graph_schema.json
Last active Sep 16, 2019
graph.json schema
View graph_schema.json
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "The Root Schema",
"required": [
"nodes",
"edges"
],
View alarm.kt
public static void setAlarm(@Nullable Context context, @NonNull String alarmIntent, @NonNull Date notificationDate, int requestCode) {
Logger.d(TAG, "[setAlarm] alarmIntent=" + alarmIntent + " notificationTimeInMillis=" + notificationDate + " notificationsIntervalInDays=" + 1 + " requestCode=" + requestCode);
if (context == null)
return;
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
if (alarmManager == null)
return;
Intent intent = new Intent(context, AlarmReceiver.class)
@kibotu
kibotu / readme.md
Created Aug 23, 2019 — forked from maxogden/readme.md
Video stabilization using VidStab and FFMPEG (Mac OS X)
View readme.md

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
View TouchViewGroup.java
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.widget.RelativeLayout;
@kibotu
kibotu / GoogleMaps+Extensions.kt
Last active Jul 25, 2019
GoogleMap workaround to keep bearing:
View GoogleMaps+Extensions.kt
/**
* map.animateCamera(CameraUpdateFactory.newLatLngBounds()) will lose ignore current bearing and rotate the camera
*/
fun GoogleMap.animateToBounds(bounds: LatLngBounds, width: Int, height: Int) = animateCamera(boundsToCameraUpdate(bounds, width, height))
/**
* map.moveCamera(CameraUpdateFactory.newLatLngBounds()) will lose ignore current bearing and rotate the camera
*/
fun GoogleMap.moveCameraToBounds(bounds: LatLngBounds, width: Int, height: Int) = moveCamera(boundsToCameraUpdate(bounds, width, height))
@kibotu
kibotu / Catalina.md
Last active Jul 23, 2019
For all apps not opening in Catalina
View Catalina.md

For all apps not opening in Catalina

Public Beta This is only for the apps being blocked by security and not opening after allowing as well.

Disable the block

sudo spctl --master-disable 

Launch the app and allow the update to complete then re-enable the block. I bet this will also resolve other software not opening as well.

@kibotu
kibotu / styles.xml
Last active Jul 23, 2019
Android window, statusbar and navigation bar flags
View styles.xml
<style name="Base.MyTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- status bar -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
View StrictMode.kt
/**
* https://developer.android.com/reference/android/os/StrictMode
*/
fun Application.initStrictMode() {
StrictMode.setThreadPolicy(
StrictMode.ThreadPolicy.Builder()
.detectCustomSlowCalls()
.detectNetwork()
.penaltyDeathOnNetwork()
@kibotu
kibotu / AppBarLayoutOverScrollViewBehavior.java
Last active Jun 26, 2019 — forked from zly394/AppBarLayoutOverScrollViewBehavior.java
Overscroll AppBarLayout Behavior—— AppBarLayout越界弹性效果
View AppBarLayoutOverScrollViewBehavior.java
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
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
You can’t perform that action at this time.