Skip to content

Instantly share code, notes, and snippets.

View nguyendkn's full-sized avatar
🎯
Focusing

Đào Khôi Nguyên nguyendkn

🎯
Focusing
View GitHub Profile
@nguyendkn
nguyendkn / hsla-color.ts
Created November 27, 2024 15:56 — forked from tphuc/hsla-color.ts
HSLA class
export class HSLAColor {
constructor(
private _hue: number,
private _saturation: number,
private _lightness: number,
private _alpha: number
) {
this._hue = _hue;
this._saturation = _saturation;
@nguyendkn
nguyendkn / selenium.py
Created July 11, 2024 02:09 — forked from korakot/selenium.py
Use selenium in Colab
# install chromium, its driver, and selenium
!apt update
!apt install libu2f-udev libvulkan1
!wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
!dpkg -i google-chrome-stable_current_amd64.deb
!wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chromedriver-linux64.zip
!unzip -j chromedriver-linux64.zip chromedriver-linux64/chromedriver -d /usr/local/bin/
!pip install selenium chromedriver_autoinstaller
# set options to be headless, ..
name: Publish Development 🚀
on:
workflow_dispatch:
push:
branches:
- main
env:
AZURE_WEBAPP_NAME: dev-api-trainersphere
@nguyendkn
nguyendkn / .editorconfig
Created May 7, 2024 13:47 — forked from m-jovanovic/.editorconfig
Sample editor config with a bunch of rules turned off 😅
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = space
@nguyendkn
nguyendkn / HOWTOTSLIB.md
Created October 10, 2023 07:34 — forked from neox5/HOWTOTSLIB.md
How to create a npm Typescript library with tests

How to create a TypeScript library (Setup, Prettier, ESLint, Jest, Publish)

TLDR;

Follow steps below. For more information checkout the references.

If something is missing or you find any mistakes, please let me know in the comments below.

@nguyendkn
nguyendkn / turn-on-wifi-hot-spot.sh
Created October 24, 2022 06:24 — forked from beginor/turn-on-wifi-hot-spot.sh
Trun on wifi spot by adb.
# open setting
adb shell am start -n com.android.settings/.TetherSettings
# down
adb shell input keyevent 20
# enter
adb shell input keyevent 66
@nguyendkn
nguyendkn / android-display-to-mac.md
Created October 23, 2022 12:23 — forked from jpwain/android-display-to-mac.md
Pipe Android device display to local Mac display using ffmpeg

On the Android device, enable Developer options, and enable USB debugging.

On the Mac:

$ brew install ffmpeg --with-ffplay

$ adb shell screenrecord --output-format=h264 - | ffplay - -x 720 -y 1280

Replace the 720 and 1280 with other values to scale the output as desired.

@nguyendkn
nguyendkn / android-backup-apk-and-datas.md
Created July 8, 2022 16:32 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nguyendkn
nguyendkn / HomePage.html
Last active March 25, 2022 11:01
AioCoreTemplates
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>hello world</h1>