Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
To be or not to be

Raymond Chan am5a03

🤔
To be or not to be
  • Hong Kong
View GitHub Profile
View gist:0dd409558c5aa82765d5d00220b3f68a
View sansaction_stick.txt
硬骨頭
雙重標準
跳梁小丑
虛張聲勢
蠻橫無理
淪為全世界笑柄
毫無政治和道德底線
撞在巨石上的臭雞蛋
赤祼祼的霸權主義行徑
View BaseViewStubFragmentAfterViewStubInflated.kt
/**
*
* @param originalViewContainerWithViewStub
*/
@CallSuper
protected fun afterViewStubInflated(originalViewContainerWithViewStub: View?) {
hasInflated = true
if (originalViewContainerWithViewStub != null) {
val pb =
originalViewContainerWithViewStub.findViewById<ProgressBar>(R.id.inflateProgressbar)
View BaseViewStubFragmentOnResume.kt
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 Jun 23, 2020
BaseViewStubFragment.kt
View 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
黃色經濟圈
View txt
愚蠢至極
給人恥笑
成事不足
敗事有餘
自廢武功
步向結業
自掘墳墓
注定失敗
壽終正寢
關門大吉
View photography.md
@am5a03
am5a03 / download_m3u8.sh
Last active Mar 29, 2020
Download m3u8 with ffmpeg
View download_m3u8.sh
#!/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 Feb 14, 2019 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts
View github_multiple-accounts.md

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

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