Skip to content

Instantly share code, notes, and snippets.

View dino-su's full-sized avatar

Dino Su dino-su

View GitHub Profile
@dino-su
dino-su / Digest Assistant System Prompt
Created August 11, 2024 07:45
ReAct Prompting for Summarization
Create digest for given article in zh-tw, the following tools is available for your disposal:
1. Survey: Skim the article to understand its structure and main points, then convert the headings, subheadings, and main points into a comprehensive list of questions.
2. Question Answering: Read the article thoroughly to find the answers to the questions. Answer the questions in your own words, using a technical writer's tone.
3. Summarization: Summarize the article using the answers from your questions in a structured format. Reflect on how the information fits with your understanding of the article and its application.
4. Translation: Translate the digest into the preferred language. Do not translate technical terms.
5. Tagging: Create 3 to 5 keywords for the article at the beginning of the digest.
6. Proofread: Read the article again and proofread the digest for accuracy. Ensure the digest is structured and coherent in Markdown format and the preferred language. Correct any errors in grammar, punctuation, and s
@dino-su
dino-su / ClockText.kt
Created September 29, 2022 03:40
Compose TextClock
@Composable
fun ClockText() {
val currentTimeMillis = remember {
mutableStateOf(System.currentTimeMillis())
}
LaunchedEffect(key1 = currentTimeMillis) {
while (true) {
delay(250)
currentTimeMillis.value = System.currentTimeMillis()
@dino-su
dino-su / Jenkinsfile
Created March 18, 2021 08:24
Android Lint with Quality Gate.
pipeline {
agent any
stages {
stage('Git') {
steps {
git 'https://github.com/android/sunflower.git'
}
}
stage('Lint') {
@dino-su
dino-su / README.md
Last active June 8, 2020 03:15
Pocket 的延伸閱讀功能
@dino-su
dino-su / facebook.md
Created April 20, 2020 23:15
Remove Facebook AD perferences.
@dino-su
dino-su / wsl.md
Last active April 13, 2020 08:18
WSL Setup

Node

  • nvm: $ nvm install --lts
@dino-su
dino-su / ubuntu.md
Last active April 20, 2020 10:17
Ubuntu Setup

Bash

  • bash_profile: $ ln -s ~/src/dotfiles/bash_profile ~/.bash_profile

2020/3/23 安裝 snap 上的版本會無法輸入中文,直接安裝 deb 檔案則沒有這個問題。

@dino-su
dino-su / notepad.md
Last active March 4, 2020 02:14
Browser Notepad

Type the following code into the browser's URL bar.

data:text/html,

def project = jenkins.model.Jenkins.instance.getItemByFullName('PROJECT_NAME')
def build = project.getBuildByNumber(87)
build.@result = hudson.model.Result.SUCCESS
// build.@result = hudson.model.Result.NOT_BUILT
// build.@result = hudson.model.Result.UNSTABLE
// build.@result = hudson.model.Result.FAILURE
// build.@result = hudson.model.Result.ABORTED
@dino-su
dino-su / fibProxy.js
Last active May 7, 2019 01:26
Fibonacci Memoization
function proxy(fn) {
const cache = {};
return function (arg) {
// add function result to cache
if (cache[arg] === undefined) cache[arg] = fn.call(this, arg);
return cache[arg];
}
}