Skip to content

Instantly share code, notes, and snippets.

View yish8213's full-sized avatar
:shipit:
Focusing

Seunghwan Linus Lee yish8213

:shipit:
Focusing
View GitHub Profile
kubectl get pod -n $namespace | grep Evicted | awk '{print $1}' | xargs kubectl delete pod -n $namespace
mvn -Dmdep.copyPom=true dependency:copy-dependencies
reposync --gpgcheck -l --repoid=$repo_id --download_path=$path
tr -d '\r' < origin_file > escaped_file
git remote -v
#origin https://github.com/USERNAME/REPOSITORY.git (fetch)
#origin https://github.com/USERNAME/REPOSITORY.git (push)
git remote set-url origin git@github.com:USERNAME/REPOSITORY.git
git remote -v
# Verify new remote URL
#origin git@github.com:USERNAME/REPOSITORY.git (fetch)
#origin git@github.com:USERNAME/REPOSITORY.git (push)
SET FOREIGN_KEY_CHECKS=0;
SELECT
Concat('TRUNCATE TABLE ', TABLE_NAME, ';')
FROM
INFORMATION_SCHEMA.TABLES
WHERE
table_schema = 'SCHEMA_NAME';
--Truncate all
rpm -qa | xargs yum info | grep '^From repo' | sort | uniq -c | sort -rn
#If you want to remove specific repository
rm /etc/yum.repos.d/repo-file.repo
yum install yum-utils
yum remove `package-cleanup --leaves`
# Assume that username is test
# Check password files
getent passwd test
# Check processes running as a user
ps aux | grep "^test"
# Check files owned by a user
find / -xdev -user test
time wget $urlAddress -q --output-document=/dev/null