From 2021c9014056466c2ecc841f7934a790221cced4 Mon Sep 17 00:00:00 2001 From: plskz Date: Thu, 1 Jul 2021 01:13:11 +0800 Subject: [PATCH 1/7] Update git.sh --- tools/git.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/git.sh b/tools/git.sh index bbbd86b..46573a0 100644 --- a/tools/git.sh +++ b/tools/git.sh @@ -41,6 +41,7 @@ git grep --heading --line-number '' # Find lines matching the patt git log --grep='' # Search Commit log git commit -m "msg" # commit changes with a msg +git commit -m "title" -m "description" # commit changes with a title and description git commit --amend # combine staged changes with the previous commit, or edit the previous commit message without changing its snapshot git commit --amend --no-edit # amends a commit without changing its commit message git commit --amend --author='Author Name ' # Amend the author of a commit From 1c6d4ee480582377d60730250d18d0fa9bc413b7 Mon Sep 17 00:00:00 2001 From: Julien Le Coupanec Date: Mon, 5 Jul 2021 22:49:19 +0200 Subject: [PATCH 2/7] docs(mysql): Run SQL query in the background --- databases/mysql.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/databases/mysql.sh b/databases/mysql.sh index b28b272..040ffe8 100644 --- a/databases/mysql.sh +++ b/databases/mysql.sh @@ -10,3 +10,5 @@ SHOW PROCESSLIST; # Show you any queries that are currently running or in the qu 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 e17d236bee7a49b96b70c65c25a845db38d80ac6 Mon Sep 17 00:00:00 2001 From: shane chambers Date: Sun, 11 Jul 2021 05:00:47 -0600 Subject: [PATCH 3/7] fixing a spelling issue --- languages/bash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index ea106d6..6d3d567 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -381,7 +381,7 @@ n<&m # file descriptor n is made to be a copy of the input file descriptor <&- # closes the standard input >&- # closes the standard output n>&- # closes the ouput from file descriptor n -n<&- # closes the input from file descripor n +n<&- # closes the input from file descriptor n |tee # output command to both terminal and a file (-a to append to file) From f6682016888f825f129385729265ac81c65e9835 Mon Sep 17 00:00:00 2001 From: shane chambers Date: Sun, 11 Jul 2021 06:17:55 -0600 Subject: [PATCH 4/7] Added a few sed commands, info, help, switch user, and sudo --- languages/bash.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/languages/bash.sh b/languages/bash.sh index 6d3d567..4710b56 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -117,6 +117,9 @@ grep -r # search recursively for pattern in directory head -n file_name | tail +n # Print nth line from file. head -y lines.txt | tail +x # want to display all the lines from x to y. This includes the xth and yth lines. +sed 's///g' # replace pattern in file with replacement value to std output the character after s (/) is the delimeter +sed -i 's///g' # replace pattern in file with replacement value in place +echo "this" | sed 's/is/at/g' # replace pattern from input stream with replacement value ############################################################################## # DIRECTORY COMMANDS @@ -145,6 +148,9 @@ ssh -p user@host # connects to host on specified port as user ssh-copy-id user@host # adds your ssh key to host for user to enable a keyed or passwordless login whoami # returns your username +su # switch to a different user +su - # switch to root, likely needs to be sudo su - +sudo # execute command as the root user passwd # lets you change your password quota -v # shows what your disk quota is date # shows the current date and time @@ -154,6 +160,8 @@ w # displays whois online finger # displays information about user uname -a # shows kernel information man # shows the manual for specified command +info # shows another documentation system for the specific command +help # shows documentation about built-in commands and functions df # shows disk usage du # shows the disk usage of the files and directories in filename (du -s give only a total) last # lists your last logins From a751a64a01ef3c9dc62bcce5e1c9b62ab8f44d4b Mon Sep 17 00:00:00 2001 From: Josh Young Date: Wed, 14 Jul 2021 13:05:54 -0300 Subject: [PATCH 5/7] Update html5.html Near , an extra space was removed from the description part. --- frontend/html5.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/html5.html b/frontend/html5.html index d090db5..3d4910e 100644 --- a/frontend/html5.html +++ b/frontend/html5.html @@ -46,7 +46,7 @@
- + From 1836f22a54c4312d999320bd5771abcdab508533 Mon Sep 17 00:00:00 2001 From: Sapna Katti Date: Sat, 17 Jul 2021 11:15:15 +0530 Subject: [PATCH 6/7] Updated java.md Updated java.md Added the enhanced for loop/for-each with example. --- languages/java.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/languages/java.md b/languages/java.md index b56f700..7c9fd6a 100644 --- a/languages/java.md +++ b/languages/java.md @@ -196,6 +196,24 @@ int c = a + b; System.out.println(i); } ``` + +>Enhanced for loop/for-each +```java +for(dataType item : array) { + ... +} + +``` +**Example:** +```java + // array of numbers + int[] numbers = {100, 200, 300, 400}; + + // for each loop + for (int number: numbers) { + System.out.println(number); +``` + > WHILE LOOP STATEMENT ```java while(condition){ //till condition will be true. From 31690932c597186cdf8633b0f9f2b4df25b4733c Mon Sep 17 00:00:00 2001 From: Mahyar Date: Wed, 4 Aug 2021 01:32:22 +0430 Subject: [PATCH 7/7] added 'ngg' command hello There :) i noticed that you did not mention 'ngg' for going to line n so i added it at line 32 p.s: it's my first contribution :D regards --- tools/vim.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/vim.txt b/tools/vim.txt index 682e0c7..6aa912d 100644 --- a/tools/vim.txt +++ b/tools/vim.txt @@ -29,6 +29,7 @@ $ end of line move line downwards, on the first non blank character gg go to first line G go to last line +ngg go to line n nG go To line n :n go To line n ) move the cursor forward to the next sentence.