From b443850b2a42e42aea9ac127c5305a8b3cb02c53 Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Mon, 6 Sep 2021 12:22:38 +0200 Subject: [PATCH 1/5] docs: mysql update --- databases/mysql.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/databases/mysql.sh b/databases/mysql.sh index 040ffe8..f55b23d 100644 --- a/databases/mysql.sh +++ b/databases/mysql.sh @@ -7,8 +7,13 @@ mysql -u username -p database_name < file.sql # Import d SHOW PROCESSLIST; # Show you any queries that are currently running or in the queue to run +show status where `variable_name` = 'Threads_connected'; # Show all connected threads +show variables like 'max_connections'; # Show maximum number of allowed connections +SET GLOBAL max_connections = 150; ## Set new value for maximum connections (no restart needed) + GRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user mysql -u root -pmypassword -e "MY SQL QUERY" &>> query.log & disown # Run SQL query in the background + From d787d6cf8df69dba74961547317f0d492e560b1c Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Mon, 6 Sep 2021 12:27:02 +0200 Subject: [PATCH 2/5] docs: mysql --- databases/mysql.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/databases/mysql.sh b/databases/mysql.sh index f55b23d..075e609 100644 --- a/databases/mysql.sh +++ b/databases/mysql.sh @@ -9,11 +9,10 @@ SHOW PROCESSLIST; # Show you any queries that are currently running or in the qu show status where `variable_name` = 'Threads_connected'; # Show all connected threads show variables like 'max_connections'; # Show maximum number of allowed connections -SET GLOBAL max_connections = 150; ## Set new value for maximum connections (no restart needed) +SET GLOBAL max_connections = 150; ## Set new value for maximum connections (no restart needed but for permanent change update my.cnf) GRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user mysql -u root -pmypassword -e "MY SQL QUERY" &>> query.log & disown # Run SQL query in the background - From ba760faecd16fb8c983f26f7a0b83f3eac67c73e Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Tue, 7 Sep 2021 11:42:54 +0200 Subject: [PATCH 3/5] docs: macos --- tools/macos.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/macos.sh diff --git a/tools/macos.sh b/tools/macos.sh new file mode 100644 index 0000000..961a1db --- /dev/null +++ b/tools/macos.sh @@ -0,0 +1 @@ +sudo lsof -i -P | grep LISTEN # List all processes running on a specific port From b6537404c7a4dc8fb02eca13f68a7c3f6bae44be Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Tue, 7 Sep 2021 11:43:55 +0200 Subject: [PATCH 4/5] docs: ubuntu --- tools/ubuntu.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 8d3d2d4..787aae1 100644 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -17,3 +17,5 @@ sudo -s # Log as root cat /proc//maps # Show the current virtual memory usage of a Linux process ip r # Display ip of the server + +lsof -i :9000 # List process running on port 9000 From b885d645fe94c83880bdbb47badb2ca1c8da5a05 Mon Sep 17 00:00:00 2001 From: yogesnsamy <28777569+yogesnsamy@users.noreply.github.com> Date: Fri, 17 Sep 2021 10:57:51 +0800 Subject: [PATCH 5/5] Update golang.md Use propercase in renaming the function in the `Testing` example --- languages/golang.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/golang.md b/languages/golang.md index 11e7dfd..fcb35fa 100644 --- a/languages/golang.md +++ b/languages/golang.md @@ -641,7 +641,7 @@ func TestSum(t *testing.T) { x, y := 2, 4 expected := 2 + 4 - if !reflect.DeepEqual(sum(x, y), expected) { + if !reflect.DeepEqual(Sum(x, y), expected) { t.Fatalf("Function Sum not working as expected") } }