Skip to content

Instantly share code, notes, and snippets.

View DEARaison's full-sized avatar
🎯
Focusing

DEA Raison DEARaison

🎯
Focusing
View GitHub Profile
@DEARaison
DEARaison / Cube gallery.html
Last active June 16, 2020 16:34
Show image on cube
@DEARaison
DEARaison / Using CLI on Windows to build OpenCV library including extra modules for Java
Last active September 23, 2023 16:40
Using CLI on Windows to build OpenCV library including extra modules for Java.
mkdir OpenCV
cd OpenCV
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_SHARED_LIBS=OFF -D BUILD_FAT_JAVA_LIB=ON -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ../opencv
cmake --build . --config release
cmake --build . --target install --config release
@DEARaison
DEARaison / Set running app for .jar file
Last active September 23, 2023 16:34
Setting on Windows to run runable .jar file by double click
assoc .jar=jarfile
ftype jarfile="C:\Program Files\Java\jre-versionxxx\bin\javaw.exe" -jar "%1" %*
:: ftype jarfile="C:\Program Files\Java\jre-12.0.2\bin\javaw.exe" -jar "%1" %*
@DEARaison
DEARaison / Solution to remove unremovable files and folders on Windows
Last active September 23, 2023 16:38
Solution to remove unremovable files/folder on Windows
1.Create folder that name "windows.old" in Local disk C
2.Drag the files or folder that cannot be deleted into Windows.old
3.run Disk cleanup
4.choose Disk C
5.then click Cleanup System Files
@DEARaison
DEARaison / Remove unnecessary IntelliJ IDEA config files.ps1
Last active September 23, 2023 16:37
Remove IntelliJ IDEA config files or folders that can be created automatically by IntelliJ
"Put config folder into the same folder with this script file"
Pause
# Files and directories need removing
$directoriesToRemove = "codestyles", "event-log-whitelist", "extensions", "jdbc-drivers", "mdn", "tasks", "workspace", "terminal"
$filesInConfigToRemove = "idea.properties", "idea64.exe.vmoptions", "user.web.token"
$filesInOptionsToRemove = "acceptedLanguageLevels.xml", "baseRefactoring.xml", "colors.scheme.xml", "databaseDrivers.xml", "debugger.xml", "dimensions.xml", "equalsHashCodeTemplates.xml", "extensionsRootType.xml", "file.template.settings.xml", "filetypes.xml", "find.xml", "images.support.xml", "jdk.table.xml", "markdown.xml", "other.xml", "laf.xml", "path.macros.xml", "profilerRunConfigurations.xml", "recentProjects.xml", "runner.layout.xml", "studioFlags.xml", "textmate_os.xml", "updates.xml", "usage.statistics.xml", "vcs.xml", "window.state.xml", "window.manager.xml", "wsl.distributions.xml"
# The total number of files/directories to remove
$totalDirs = $directoriesToRemove.Length
$totalFil
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
public static void main(String[] args) {
String userHomePath = System.getProperty("user.home");
String projectDirPath = System.getProperty("user.dir");
String roamingAppDataPath = System.getenv("AppData");
String LocalAppDataPath = System.getenv("LocalAppData");
String localLowAppDataPath = System.getProperty("user.home") + File.separator + "AppData" + File.separator + "LocalLow";
System.out.println(userHomePath);
System.out.println(projectDirPath);
System.out.println(roamingAppDataPath);
@DEARaison
DEARaison / Rename Github's default branch
Last active October 14, 2021 13:24 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
If you want to rename a brach being the Github's default branch, You must set the default branch to another branch before renaming the branch.
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch from remote
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@DEARaison
DEARaison / SHOPEE Statistics
Last active April 18, 2024 17:05
To Get Shopee Statistics
var tongDonHang = 0;
var tongTienTietKiem=0;
var tongtienhang = 0;
var tongtienhangchuagiam = 0;
var tongSanPhamDaMua = 0;
var trangThaiDonHangConKhong = true;
var offset = 0;
var si = 20;
function xemBaoCaoThongKe() {
var orders = [];
public static void wait(int ms)
{
try
{
Thread.sleep(ms);
}
catch(InterruptedException ex)
{
Thread.currentThread().interrupt();
}