Skip to content

Instantly share code, notes, and snippets.

View tbfungeek's full-sized avatar
😘
Coding

Xiaohai.lin tbfungeek

😘
Coding
View GitHub Profile
@johnmcfarlane
johnmcfarlane / begin(C++).md
Last active October 17, 2025 19:58
Resources for C++ beginners
@marciogranzotto
marciogranzotto / VIPER Android Example.kt
Last active October 5, 2025 06:22
This is an example of Android development with VIPER in Kotlin
interface LoginContracts {
interface View {
fun showError(message: String)
}
interface Presenter {
fun onDestroy()
fun onLoginButtonPressed(username: String, password: String)
}
@tbfungeek
tbfungeek / RealmMigrationDemo.java
Created January 21, 2017 14:03 — forked from brucetoo/RealmMigrationDemo.java
Realm数据库迁移实例
package com.brucetoo.realmdemo.realmmigration;
import android.app.Application;
import android.util.Log;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.RealmMigration;
import io.realm.RealmObject;
import io.realm.internal.ColumnType;
@tasomaniac
tasomaniac / screenrecord.sh
Last active October 26, 2025 18:44 — forked from PaulKinlan/getdeviceart.sh
Screen Record for Android
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi
@swankjesse
swankjesse / RetrofitCachingExample.java
Created June 29, 2013 03:03
Demonstrate HTTP caching with OkHttp and Retrofit.
/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@wobbals
wobbals / AvcEncoder.java
Created October 31, 2012 22:46
MediaCodec encoder sample
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {