Skip to content

Instantly share code, notes, and snippets.

View yeungon's full-sized avatar
💭
In JavaScript we trust

Vuong Nguyen yeungon

💭
In JavaScript we trust
View GitHub Profile
#!/bin/bash
#######################################################
# KiwiPanel Installer v0.0.1
# To install KiwiPanel type:
# curl -sLO https://raw.githubusercontent.com/yeungon/kiwiscript/main/install && chmod +x install && sudo bash install
#######################################################
LANG=en_US.UTF-8
@yeungon
yeungon / kiwi.sh
Last active September 19, 2023 07:01
#!/bin/bash
#######################################################
# Kiwiscript Installer v0.0.1
# To install Kiwiscript type:
# curl -sLO https://raw.githubusercontent.com/yeungon/kiwiscript/main/install && chmod +x install && sudo bash install
#######################################################
LANG=en_US.UTF-8
#!/bin/bash
#######################################################
# KiwiPanel Script Installer v0.1
# To install KiwiPanel Script type:
# curl -sO && bash install
#######################################################
install_go(){
sudo snap install go --classic
}
This file has been truncated, but you can view the full file.
# Rime dictionary
# encoding: utf-8
#
# Jyutping - 粵拼
#
# derived from scim-table-h Jyutping table.
#
---
name: SinoNom
const fs = require("fs");
const path = require("path");
const folderPath = __dirname + "/MBall_sections_applx_RAs_MARKUP";
const outputFolderPath = __dirname + "/conclusion";
fs.readdir(folderPath, (err, files) => {
if (err) {
console.error("Error reading folder:", err);
return;
@yeungon
yeungon / docker_wordpress.md
Created August 2, 2023 16:43 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
/* nếu screen <= 1440px */
@media only screen and (max-width: 1440px) {
}
/* nếu screen <= 1366px */
@media only screen and (max-width: 1366px) {
@yeungon
yeungon / inject.js
Created December 4, 2022 07:05
inject css and js to chrome extension
/**
* injectScript - Inject internal script to available access to the `window`
*
* @param {type} file_path Local path of the internal script.
* @param {type} tag The tag as string, where the script will be append (default: 'body').
* @see {@link http://stackoverflow.com/questions/20499994/access-window-variable-from-content-script}
* @reference https://gist.github.com/devjin0617/3e8d72d94c1b9e69690717a219644c7a?permalink_comment_id=3766826#gistcomment-3766826
*/
function injectScript(file_path, tag) {
var node = document.getElementsByTagName(tag)[0];
@yeungon
yeungon / readasync.js
Last active November 16, 2022 03:32
Read huge JSON with Node
const StreamArray = require('stream-json/streamers/StreamArray');
const fs = require('fs');
let combine = "Working_Vietnamese_English_Combined.json";
let vnedict = `vnedict__vietnamese-english.json`
const jsonStream = StreamArray.withParser();
fs.createReadStream(vnedict).pipe(jsonStream.input);
[aAàÀảẢãÃáÁạẠăĂằẰẳẲẵẴắẮặẶâÂầẦẩẨẫẪấẤậẬbBcCdDđĐeEèÈẻẺẽẼéÉẹẸêÊềỀểỂễỄếẾệỆfFgGhHiIìÌỉỈĩĨíÍịỊjJkKlLmMnNoOòÒỏỎõÕóÓọỌôÔồỒổỔỗỖốỐộỘơƠờỜởỞỡỠớỚợỢpPqQrRsStTuUùÙủỦũŨúÚụỤưƯừỪửỬữỮứỨựỰvVwWxXyYỳỲỷỶỹỸýÝỵỴzZ]+
let vietnameseCharacters = `AÀẢÃÁẠĂẰẲẴẮẶÂẦẨẪẤẬBCDĐEÈẺẼÉẸÊỀỂỄẾỆGHIÌỈĨÍỊKLMNOÒỎÕÓỌÔỒỔỖỐỘƠỜỞỠỚỢPQRSTUÙỦŨÚỤƯỪỬỮỨỰVXYỲỶỸÝỴ`