Skip to content

Instantly share code, notes, and snippets.

View am5a03's full-sized avatar
🤔
To be or not to be

Raymond Chan am5a03

🤔
To be or not to be
  • Hong Kong
View GitHub Profile
@am5a03
am5a03 / gist:0dd409558c5aa82765d5d00220b3f68a
Last active March 27, 2021 05:09
Flutter learning materials
@am5a03
am5a03 / sansaction_stick.txt
Created August 10, 2020 08:54
制裁金剛棒
硬骨頭
雙重標準
跳梁小丑
虛張聲勢
蠻橫無理
淪為全世界笑柄
毫無政治和道德底線
撞在巨石上的臭雞蛋
赤祼祼的霸權主義行徑
/**
*
* @param originalViewContainerWithViewStub
*/
@CallSuper
protected fun afterViewStubInflated(originalViewContainerWithViewStub: View?) {
hasInflated = true
if (originalViewContainerWithViewStub != null) {
val pb =
originalViewContainerWithViewStub.findViewById<ProgressBar>(R.id.inflateProgressbar)
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val view = inflater.inflate(R.layout.fragment_viewstub, container, false)
mViewStub = view.findViewById(R.id.fragmentViewStub) as ViewStub
mViewStub!!.layoutResource = getViewStubLayoutResource()
mSavedInstanceState = savedInstanceState
@am5a03
am5a03 / BaseViewStubFragment.kt
Last active June 23, 2020 14:26
BaseViewStubFragment.kt
package com.raymond.viewstubfragmentdemo
import android.os.Bundle
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.ViewStub
@am5a03
am5a03 / txt
Created May 11, 2020 03:12
黃色經濟圈
愚蠢至極
給人恥笑
成事不足
敗事有餘
自廢武功
步向結業
自掘墳墓
注定失敗
壽終正寢
關門大吉
@am5a03
am5a03 / download_m3u8.sh
Last active March 29, 2020 08:00
Download m3u8 with ffmpeg
#!/bin/sh
URL=$1
OUTPUT=$2
ffmpeg -user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7" -i "$URL" -c copy "$OUTPUT.mp4"
@am5a03
am5a03 / github_multiple-accounts.md
Created February 14, 2019 02:40 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts

Step 1 - Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.

Step 2 - Attach the New Key

<LinearLayout
android:width="wrap_content"
android:height="wrap_content"
android:descendantFocusability="false"
android:orientation="vertical">
<PostView ... />
<PublisherAdView ... />
</LinearLayout>