mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-01-26 05:08:03 -08:00
Merge branch 'LeCoupa:master' into master
This commit is contained in:
@@ -7,6 +7,10 @@ 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 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 but for permanent change update my.cnf)
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database
|
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
|
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ func TestSum(t *testing.T) {
|
|||||||
x, y := 2, 4
|
x, y := 2, 4
|
||||||
expected := 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")
|
t.Fatalf("Function Sum not working as expected")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
tools/macos.sh
Normal file
1
tools/macos.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sudo lsof -i -P | grep LISTEN # List all processes running on a specific port
|
||||||
@@ -17,3 +17,5 @@ sudo -s # Log as root
|
|||||||
cat /proc/<process_id>/maps # Show the current virtual memory usage of a Linux process
|
cat /proc/<process_id>/maps # Show the current virtual memory usage of a Linux process
|
||||||
|
|
||||||
ip r # Display ip of the server
|
ip r # Display ip of the server
|
||||||
|
|
||||||
|
lsof -i :9000 # List process running on port 9000
|
||||||
|
|||||||
Reference in New Issue
Block a user