Skip to content

Instantly share code, notes, and snippets.

View lamngockhuong's full-sized avatar
🍊
Working

Lâm Ngọc Khương lamngockhuong

🍊
Working
View GitHub Profile
@lamngockhuong
lamngockhuong / font
Created November 2, 2022 08:31
Check font
javascript:(function(){if(!document.getElementById('fountscript')){var founts=document.createElement('script');founts.src='https://fount.artequalswork.com/fount.js';founts.id='fountscript';document.body.appendChild(founts);}})();
@lamngockhuong
lamngockhuong / readme.md
Created July 16, 2019 00:56
How to change the ubuntu login screen
$ sudo gedit /usr/share/gnome-shell/theme/ubuntu.css

Find "#lockDialogGroup" keyword:

alt text

Replace with:

#lockDialogGroup {
@lamngockhuong
lamngockhuong / .htaccess
Created July 14, 2019 02:14
Redirect all path to index.html root file - ReactJS on hosting
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(static/?|$)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
@lamngockhuong
lamngockhuong / readme.md
Created May 21, 2019 09:57
npm test error with jest on reactjs (ubuntu)

Error on ubuntu

> react-scripts test

Error: watch /home/lam.ngoc.khuong/develop/project/my-workspace/react/learn-react/hackernews/node_modules/accepts ENOSPC
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at NodeWatcher.watchdir (/home/lam.ngoc.khuong/develop/project/my-workspace/react/learn-react/hackernews/node_modules/sane/src/node_watcher.js:159:22)
    at Walker.<anonymous> (/home/lam.ngoc.khuong/develop/project/my-workspace/react/learn-react/hackernews/node_modules/sane/src/common.js:109:31)
    at emitTwo (events.js:126:13)
@lamngockhuong
lamngockhuong / ConsumeHeap.java
Created May 3, 2019 07:19 — forked from mosheeshel/ConsumeHeap.java
Function to fill JVM/Java Heap, Java options to automatically create a Heapdump on that event and a companion script to upload resulting files to S3
import java.io.IOException;
import java.util.Vector;
/**
* Created by moshee
* on: 07/06/17
* to compile in place: `javac ConsumeHeap.java`
* Execute: `java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/app-`date +%s`-pid$$.hprof -XX:OnOutOfMemoryError=/opt/app/bin/upload_dump_s3.sh -Xmx2m ConsumeHeap`
* HeapDumpOnOutOfMemoryError specifies to automatically create a dump when OOM occures
* HeapDumpPath supplies a path to put that file
@lamngockhuong
lamngockhuong / application-dev.yml
Created April 25, 2019 06:53
Spring application configuration for default logging
logging:
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} ${LOG_LEVEL_PATTERN:-%5p} %m%n"
level:
org.springframework.web: INFO
org:
springframework:
web:
filter:
CommonsRequestLoggingFilter: DEBUG
@lamngockhuong
lamngockhuong / FileHelper.java
Created September 14, 2018 03:37
FileHelper
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Comparator;
public class FileHelper {
@lamngockhuong
lamngockhuong / exceptions-tree.php
Last active July 7, 2018 06:49
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
@lamngockhuong
lamngockhuong / README.md
Last active May 16, 2018 03:59
[Eclipse Shortcut for Ubuntu Unity] - ubuntu, java, eclipse

Eclipse Shortcut for Ubuntu Unity

a shortcut to run Eclipse on Ubuntu Unity and to register Eclipse with the left Launcher

Installation

@lamngockhuong
lamngockhuong / node.md
Last active June 12, 2019 15:17
[Install Java 10 on Linux] - ubuntu, java 10, jdk

Option 1: Easy Installation (PPA)

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-installer

Option 2: Manual Installation

  • Download [OpenJDK 10][1] binaries for Linux.