Skip to content

Instantly share code, notes, and snippets.

View limkhashing's full-sized avatar
:octocat:
When there is a challenge, there is an opportunity

Lim Kha Shing limkhashing

:octocat:
When there is a challenge, there is an opportunity
View GitHub Profile
@limkhashing
limkhashing / Use Case Description.txt
Created February 16, 2026 06:29
Learning about Use Case
First of all the UseCase suffix is not necessary. Also capsuling a function into a class where no dependencies are needed is also not necessary. Makes it more complex. You should use operator function "invoke" if you need a class for injecting deps and name the class like a function (ValidateEmail). You can call the instance easily like a function ("validateEmail(...)"). Really good readable.
Example 2 is wrong IMHO. There is no such thing like the representation layer and a dogmatic assignment. Historically the splitting of View and Logic (Presenter, VM, Controller) was because of testing issues. The View isn't really good testable because of the huge framework which it brings with it. Therefore ALL code, which is testable should be tested and the View should have as less conditions (logic) as possible. It was always the responsibility of the Presenter (VM, Controller) to map the Data from different sources into an format the View can understand (ViewState) and which needs no further mapping/conditions (if
@limkhashing
limkhashing / com.liskovsoft.appupdatechecker2.preferences.xml
Created September 24, 2025 18:19
SmartTube Backup. Download all and zip it. Restore from SmartTube
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="latest_version_number" value="2152" />
<string name="latest_version_name">29.62</string>
<string name="apk_path">/storage/emulated/0/Android/data/com.teamsmart.videomanager.tv/cache/update.apk</string>
<long name="last_checked_ms" value="1758737506894" />
</map>
@limkhashing
limkhashing / SponsorBlockConfig_2025-09-18_17.05.00.json
Created September 18, 2025 17:08
SponsorBlock by Ajay Ramachandran
{
"barTypes": {
"preview-chooseACategory": {
"color": "#ffffff",
"opacity": "0.7"
},
"sponsor": {
"color": "#00d400",
"opacity": "0.7"
},
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2025-09-25T15:30:27.101Z",
"redirects": [
{
"description": "Force WhatsApp links to open in WhatsApp Web",
"exampleUrl": "https://api.whatsapp.com/send?phone=60123456789",
"exampleResult": "https://web.whatsapp.com/send?phone=60123456789",
"error": null,
"includePattern": "https://api.whatsapp.com/*",

Android Module Unit Test Generation Standard

Prompt Usage Instructions

Use these specific prompt formats to leverage this comprehensive testing framework:

For New Test Classes (Testing Brand New Classes)

Generate unit tests for {ClassName} using #file:unit-test-generation-prompt.md
@limkhashing
limkhashing / teams-active.sh
Last active June 19, 2025 08:17
Stay Active on Microsoft Teams!
#!/bin/bash
caffeinate -d &
while true;
do
osascript -e 'tell application "Microsoft Teams" to activate'
osascript -e 'tell application "System Events" to keystroke "2" using {command down}'
echo "Teams Status Refreshed"
sleep 300
done
@limkhashing
limkhashing / config.yaml
Created June 19, 2025 08:14
Tabby Config
version: 7
profiles: []
groups: []
configSync:
parts: {}
hotkeys:
toggle-window:
- Ctrl-Space
copy-current-path: []
ctrl-c:
@limkhashing
limkhashing / .zshrc
Last active June 20, 2025 16:44
ZSH config for Terminal
########## Shell Configuration ##########
if [[ -f "/opt/homebrew/bin/brew" ]] then
# If you're using macOS, you'll want this enabled
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
@limkhashing
limkhashing / deploy.yml
Last active August 7, 2025 17:57
Nginx config
name: Deploy Notes SpringBoot Backend
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
@limkhashing
limkhashing / EdgeToEdgeDemo.kt
Created February 12, 2025 14:40
Handle Edge to Edge that was enforced on Android 15
@Composable
fun ScreenContent() {
EdgeToEdgeDemoTheme {
// Need to add Scaffold, and can apply Material 3 theme. Scaffold will automatically handle the window insets
Scaffold(
topBar = {
TopAppBar(
title = { Text("Hello world!") },
colors = TopAppBarDefaults.topAppBarColors(
containerColor = Color(0xFF37B362)