Skip to content

Instantly share code, notes, and snippets.

Your role is to embody the persona of a typical user from LIHKG.com, a popular forum in Hong Kong. The forum is also known as 連登 locally. You're expected to express yourself in a way that's reflective of the community's culture, using specific phrases, Cantonese slang, and a certain level of humor or sarcasm common among its members, including being a bit rude and mean in a manner similar to these samples: "行咁慢 冇人識你呀, 阻撚住條路" ("Walking so slow, nobody knows you, blocking the way"), "大陸KOL求其一個都過百萬啦" ("Any random mainland KOL has over a million followers"), "明星出街都唔會咁啦" ("Even celebrities don't act like this when they go out"). This embodies the frank and direct tone often found in LIHKG discussions.
Make sure respond with direct and concise usually with no more than 2 sentences. Also, sentences are usually broken in lines. For example, instead of one complete sentence:
睇到右面碟肉就知靚野,一定濕潤彈牙有口感,餵狗都未必食。
Break it into three lines:
睇到右面碟肉就知靚野
一定濕潤彈牙有口感
餵狗都未必食
@compustar
compustar / ChatGPT (gpt-4o).txt
Last active May 14, 2024 17:14
Prompt collection of different chat agent
You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture.
Knowledge cutoff: 2023-10
Current date: 2024-05-15
Image input capabilities: Enabled
Personality: v2
# Tools
You have the following tools:
Sample for reference only
Copyright © 2001 Hong Kong Institute of Human Resource Management. All rights reserved.
@compustar
compustar / employee_handbook_qna_gpt3.ipynb
Last active January 26, 2023 05:17
employee_handbook_qna_gpt3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@compustar
compustar / Dockerfile.appd_jdk6
Created August 25, 2022 19:14
TLS Bumping for Java 6 AppDynamics Agent Instrumentation with NGINX
FROM yannart/jboss-5.1.0.ga-jdk6
# Download the agent and configure the controller-info.xml BEFORE building the image
COPY AppServerAgent /opt/appdynamics
ENV JAVA_TOOL_OPTIONS=-javaagent:/opt/appdynamics/javaagent.jar
@compustar
compustar / Dockerfile
Created August 18, 2022 15:31
AppDynamics Agent Instrumentation for Java 6
FROM yannart/jboss-5.1.0.ga-jdk6
# Download the agent and configure the controller-info.xml BEFORE building the image
COPY AppServerAgent /opt/appdynamics
# INSTRUCTION REFERENCE: https://stackoverflow.com/questions/33364100/how-to-use-tls-1-2-in-java-6
# Update Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6
RUN wget --continue --no-check-certificate --header "Cookie: oraclelicense=a" "https://download.oracle.com/otn-pub/java/jce_policy/6/jce_policy-6.zip" && \
unzip jce_policy-6.zip && \
@compustar
compustar / Unpivot.vb
Created February 16, 2020 19:34
Unpivoting Statistics on Passenger Traffic at https://www.immd.gov.hk/eng/message_from_us/stat.html
Sub Unpivot()
'
' Macro1 Macro
'
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("C5").Select
Selection.Copy
Columns("D:D").Select
@compustar
compustar / CleanWikiCovid.vb
Last active March 13, 2020 03:44
VBA macro to preprocess 2019 nCoV data
Sub CleanWikiCovid()
Selection.Hyperlinks.Delete
Selection.UnMerge
Range("A1").Select
Cells.Find(What:="date", After:=ActiveCell, LookIn:=xlFormulas2, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
While Selection.Column > 1
Selection.EntireColumn.Delete
@compustar
compustar / parse_gmap_json.py
Last active February 9, 2020 07:39
Python script parses Google Map JSON and convert it to Excel parsable JSON
import json
def get_layers(data):
return data[1][6]
def get_items(data):
return data[12][0][13][0]
def parse_item(item):
output = {"latitude": item[1][0][0][0],
@compustar
compustar / MergeWorksheets.vb
Created February 1, 2020 09:34
VBA to merge Excel Worksheets
Sub Macro3()
'
' Macro3 Macro
'
newSheetName = "MergedSheet"
On Error Resume Next
Sheets(newSheetName).Select
If ActiveSheet.Name <> newSheetName Then