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://beebom.com/how-flush-dns-cache-linux/ | |
https://www.natro.com/blog/dns-onbellegi-temizleme/ |
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
# Display git branch in bash prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[git:\1]/' | |
} | |
files_count(){ | |
/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g' | |
} |
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
topshellv.com |
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://github.com/jpillora/xhook |
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
.parent-class { | |
& /deep/ .child-class { | |
background-color: #000; | |
} | |
} |
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
function customizer(objValue, srcValue) { | |
if (Array.isArray(srcValue)) { | |
return srcValue | |
} | |
if (srcValue instanceof Object && Object.keys(srcValue).length === 0) { | |
return srcValue | |
} | |
} |
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
Exclude .git file and node_modules directory | |
zip -r9 [target_file] [source_file] -x *.git* node_modules/\* | |
Exclude .git file and files in node_modules directory, but keep node_modules directory | |
$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\* |
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
git checkout <COMMIT#> <path/to/the/messed/up/file> | |
Example: | |
git checkout f08a63ff4fa7b8479f8c698e5998ee1afcac3a4e src/assets/images/file.svg |
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
sed -i 's/original/new/g' file.txt | |
Explanation: | |
sed = Stream EDitor | |
-i = in-place (i.e. save back to the original file) | |
The command string: | |
s = the substitute command | |
original = a regular expression describing the word to replace (or just the word itself) | |
new = the text to replace it with |
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
local branch: git branch -d [branch] | |
remote branch: git push origin --delete [branch] |