Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View BruceZu's full-sized avatar

Bruce Zu BruceZu

View GitHub Profile
@BruceZu
BruceZu / .java
Last active January 21, 2022 23:44
QuickSet
class QuickSet {
int[] vi, iv;
int count;
public QuickSet(int N) {
vi = new int[N]; // Value To Index
iv = new int[N]; // index To Value
count = 0;
}
@BruceZu
BruceZu / .bash
Created October 16, 2021 03:09
Tomcat Intellij IDE
cd tomcat/
ant -buildfile build.xml ide-intellij
@BruceZu
BruceZu / .java
Last active October 15, 2021 03:11
Points.java
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Points {
/*
Fetch Rewards Coding Exercise - Backend Software Engineering
What do I need to submit?
@BruceZu
BruceZu / Git.mk
Created April 3, 2018 05:23
Git branch model command
questions and tests to understand it.
c src
@BruceZu
BruceZu / Command Keyboard Shortcuts.mk
Last active April 16, 2018 16:59
Command Keyboard Shortcuts hotkeys
Linux
https://www.computerhope.com/ushort.htm
Vim
https://www.maketecheasier.com/vim-keyboard-shortcuts-cheatsheet/
@BruceZu
BruceZu / JVM hot swap.mk
Last active April 3, 2018 02:18
JVM hot swap
JVM hot swap
@BruceZu
BruceZu / debug.mk
Last active April 7, 2018 19:53
HTML Javascript CSS debug
debug dynamically created file
@BruceZu
BruceZu / mongo-rplset-EC2-monitoring.md
Last active May 12, 2018 03:35
Monitor Mongo replica set EC2 disk space usage and log rotation status

It is hourly checking bash. checking and send email in issue cases.

  • the connection of each EC2. Find host unreachable issue in one hour
  • disk space usage. Get warn of disk space in one hour
  • status of log rotation and log files. Monitor log rotation and rotated log files

Anyone wants to use it:

  • Update the variable mail_receiver of the bash file diskmonoitorand create a cron job with it like