This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "*.txt" -exec mv {} text_files/ \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://askubuntu.com/questions/39922/how-do-you-select-the-fastest-mirror-from-the-command-line | |
| curl -s http://mirrors.ubuntu.com/mirrors.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-102400 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -g -r |head -1| awk '{ print $2 }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mkdir -p /var/run/mysqld | |
| sudo chown mysql:mysql /var/run/mysqld |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo systemctl stop mysql | |
| sudo mysqld_safe --skip-grant-tables & | |
| mysql -u root | |
| UPDATE mysql.user SET authentication_string=null WHERE User='root'; | |
| flush_privileges; | |
| ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd'; | |
| exit; | |
| ps -fea | grep mysqld | |
| sudo kill -9 [pid from previous command] | |
| # Credit: https://stackoverflow.com/questions/50691977/how-to-reset-the-root-password-in-mysql-8-0-11 @Ulises Layera |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __URL_REGEX = re.compile(r'^https?://[^\s/$.?#].[^\s]*$', re.IGNORECASE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data:text/html, <textarea style="font-size: 1.5em; width: 100%; height: 100%; border: none; outline: none" autofocus /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "ID": 1, | |
| "ResourceGroupID": 2, | |
| "Code": "200", | |
| "CodeName": "highschoolacademicperformance_adme", | |
| "Description": "Xét kết quả học tập cấp THPT (học bạ)", | |
| "Note": null, | |
| "CreatedAt": "2022-11-08 03:12:51.620", | |
| "CreatedBy": "dattdhe140517@fpt.edu.vn", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/zulu8.64.0.19-ca-jdk8.0.345-linux_x64/bin/java" 1 | |
| update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/zulu8.64.0.19-ca-jdk8.0.345-linux_x64/bin/javac" 1 | |
| update-alternatives --install "/usr/bin/jps" "jps" "/usr/lib/jvm/zulu8.64.0.19-ca-jdk8.0.345-linux_x64/bin/jps" 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Youtube bulk unsubsribe fn. | |
| * Wrapping this in an IIFE for browser compatibility. | |
| */ | |
| (async function iife() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Append it in `/etc/bash.bashrc` | |
| if [[ -n $SSH_CONNECTION ]] ; then | |
| curl "https://HOST/message?token=XXX" -F "title=user:$USER logged -> $(cat /proc/sys/kernel/hostname)" -F "message=IP: $(who am i| awk -F'[()]' '{print $2}'), at: $(date)" -F "priority=9" > /dev/null | |
| fi |
NewerOlder