Skip to content

Instantly share code, notes, and snippets.

View luongvo's full-sized avatar
🚀
flying in the sky

Luong Vo (Lucas) luongvo

🚀
flying in the sky
View GitHub Profile
@luongvo
luongvo / manage_milestones_with_gh.md
Created November 23, 2023 02:08 — forked from doi-t/manage_milestones_with_gh.md
Manage milestones with gh

Use gh v0.11.0 or later for the "shell" aliases.

Run the following gh alias set commands for each operation. You can confirm the created aliases with gh alias list.

gh listMilestones

gh alias set listMilestones "api graphql -F owner=':owner' -F name=':repo' -f query='
    query ListMilestones(\$name: String\!, \$owner: String\!) {
        repository(owner: \$owner, name: \$name) {
            milestones(first: 100) {
private static boolean isAndroidModule(Project project) {
boolean isAndroidLibrary = project.plugins.hasPlugin('com.android.library')
boolean isAndroidApp = project.plugins.hasPlugin('com.android.application')
return isAndroidLibrary || isAndroidApp
}
afterEvaluate { project ->
def projectName = project.name
if (isAndroidModule(project)) setupAndroidReporting()
else setupKotlinReporting()
@luongvo
luongvo / convert-mov-to-mp4.md
Created December 27, 2021 18:25 — forked from rudyhuynh/convert-mov-to-mp4.md
Convert MOV to MP4
brew install ffmpeg
ffmpeg -i my-video.mov -vcodec h264 -acodec mp2 my-video.mp4
@luongvo
luongvo / flutter_github_ci.yml
Created September 8, 2021 16:21 — forked from rodydavis/flutter_github_ci.yml
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@luongvo
luongvo / ActivityLifecycle.md
Created December 7, 2018 07:12 — forked from kristopherjohnson/ActivityLifecycle.md
Notes about Android Activity lifecycle method ordering

Results of some experiments to determine which Activity lifecycle methods get called in certain situations.

Scenario: Launch app from home, then return home

Launch:

  • activity.onCreate()
  • activity.onStart()
  • activity.onResume()
  • activity.onWindowFocusChanged(true)
@luongvo
luongvo / config.yml
Created September 10, 2018 17:39 — forked from bassaer/config.yml
CircleCI 2.0でAndroidライブラリの自動デプロイ ref: http://qiita.com/bassaer/items/6b9aedae4571d59f0fdf
version: 2
jobs:
build:
branches:
only:
- master
- develop
docker:
# specify the version you desire here
- image: circleci/android:api-26-alpha
@luongvo
luongvo / Readme.md
Created May 28, 2018 20:06 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@luongvo
luongvo / build.gradle
Created January 3, 2018 17:35
Aggregated Jacoco reports in a multi-project Gradle build
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
repositories {
jcenter()
}
jacoco {
toolVersion = '0.7.1.201405082137'
@luongvo
luongvo / cp-env-to-properties.sh
Created January 3, 2018 07:20 — forked from danielgomezrico/cp-env-to-properties.sh
Gradle / Bash - copy all env variables to app/gradle.properties (used to copy secret env vars from travis or circle CI to build android projects)
#!/usr/bin/env bash
#
# Copy env variables to app module gradle properties file
#
set +x // dont print the next lines on run script
printenv | tr ' ' '\n' > app/gradle.properties
set -x
#
# Circle CI & gradle.properties live in harmony
#
# Android convention is to store your API keys in a local, non-versioned
# gradle.properties file. Circle CI doesn't allow users to upload pre-populated
# gradle.properties files to store this secret information, but instaed allows
# users to store such information as environment variables.
#
# This script creates a local gradle.properties file on current the Circle CI
# instance. It then reads environment variable TEST_API_KEY_ENV_VAR which a user