Skip to content

Instantly share code, notes, and snippets.

@miranda-zhang
miranda-zhang / terraform.md
Last active March 5, 2024 09:34
terraform command and examples
@miranda-zhang
miranda-zhang / java.md
Last active June 29, 2020 05:16
Java related problems and solutions
@miranda-zhang
miranda-zhang / mac.md
Last active July 24, 2019 05:16
MacOS commands
@miranda-zhang
miranda-zhang / maven.md
Created July 9, 2019 00:45
Maven commands

Maven commands

mvn --version
mvn clean compile
mvn -f $APP_REPO_DIR/java/pom.xml clean compile

Chrome

Stop redirect from http to https

  1. Delete domain security policies chrome://net-internals/#hsts Enter domain name under "Delete domain security policies" and press the Delete button.
  2. Clear browsing data Settings > Show advanced settings… > Privacy > Clear browsing data https://superuser.com/q/565409/273113

stop redirect from http to https

chrome://net-internals/#hsts

Tmux

Ctrl+b = C-b

Ctrl+b " = Ctrl+b release, then press shift + '.

Splite pane

Ctrl+b " — split pane vertically.

Apache Web Server

Ubuntu

apt-get install apache2

Suppress warning message Could not reliably determine the server's fully qualified domain name

Add at the bottom of /etc/apache2/apache2.conf

@miranda-zhang
miranda-zhang / regex.md
Last active May 15, 2019 03:05
Regular expression

Regular expression cheatsheet

Digits

^     : Start anchor
[0-9] : Character class to match one of the 10 digits
{1,6} : Range quantifier. Minimum 1 repetition and maximum 6.
$     : End anchor

\d can be used as an equivalent of [0-9], i.e. ^\d{1,6}$

@miranda-zhang
miranda-zhang / linux.md
Last active November 3, 2024 18:08
Linux Command Cheat Sheet, Ubuntu, CentOS

Linux Command Cheatsheet

Linux Keyboard shortcuts

open terminal: Ctrl+Alt+T

Ctrl + C is used to kill a process with signal SIGINT , in other words it is a polite kill .

Ctrl + Z is used to suspend a process by sending it the signal SIGTSTP , which is like a sleep signal, that can be undone and the process can be resumed again.