Skip to content

Instantly share code, notes, and snippets.

Avatar
📘
Studying

Qifan Yang underwindfall

📘
Studying
View GitHub Profile
View 📊 Weekly development breakdown 🎯
Kotlin 14 hrs 6 mins ■■■■■■■■■■■■■■▥□□□□□□□□□ 46.4%
Java 12 hrs 11 mins ■■■■■■■■■■■■■□□□□□□□□□□□ 40.1%
XML 2 hrs 10 mins ■■■■■◱□□□□□□□□□□□□□□□□□□ 7.1%
CSV 59 mins ■■■■◱□□□□□□□□□□□□□□□□□□□ 3.3%
Groovy 31 mins ■■■■□□□□□□□□□□□□□□□□□□□□ 1.7%
JavaScript 14 mins ■■■▦□□□□□□□□□□□□□□□□□□□□ 0.8%
@underwindfall
underwindfall / release_debug_apk.yml
Created Apr 4, 2020
Github Workflow Action Create Release and Add Debug.Apk as additional asset
View release_debug_apk.yml
name: Release And Update
on:
push:
tags:
- "v*"
jobs:
apk:
name: Release APK
runs-on: ubuntu-18.04
View android sms.sh
#!/bin/bash TEXT=$1 if [ -z "$TEXT" ]; then echo "Usage: android-paste TEXT" exit fi ( echo sms send 5555555555 $TEXT; sleep 1; ) | telnet localhost 5554 &> /dev/null
View Kotlin Extensions .md
View ViewExtensions.kt
/**
* Utility functions for Android View
*/
fun View.setZTranslation(z: Float) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
this.translationZ = z
}
}
/**
View watcher.xml
<TaskOptions>
<TaskOptions>
<option name="arguments" value="--write --single-quote --tab-width 4 -- $FilePath$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="js" />
<option name="immediateSync" value="false" />
<option name="name" value="Prettier" />
<option name="output" value="" />
@underwindfall
underwindfall / FastFile iOS
Created Oct 10, 2018
Template FastFile iOS
View FastFile iOS
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
View FastFile Android
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@underwindfall
underwindfall / DividerItemDecorator.kt
Created Sep 6, 2018 — forked from rock3r/DividerItemDecorator.kt
A simple yet fully featured RecyclerView ItemDecorator that draws a divider line between items. Only works with vertical LinearLayoutManagers!
View DividerItemDecorator.kt
package me.seebrock3r.common.widget
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.view.View
import androidx.annotation.ColorInt
import androidx.annotation.Px
import androidx.core.graphics.withTranslation
import androidx.core.view.children
View BarListParcelConverter.java
// Specific class for a RealmList<Bar> field
public class BarListParcelConverter extends RealmListParcelConverter<Bar> {
@Override
public void itemToParcel(Bar input, Parcel parcel) {
parcel.writeParcelable(Parcels.wrap(input), 0);
}
@Override
public Bar itemFromParcel(Parcel parcel) {