This file contains 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
1) In your terminal, open the file using vim: | |
vim file_name | |
2) Remove all BOM characters: | |
:set nobomb | |
3) Save the file: | |
:wq |
This file contains 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
tmp_ssh_host=$(echo $(git remote get-url origin) | sed 's/https:\/\/bitbucket.org\//git@bitbucket.org:/g') | |
git remote remove origin && git remote add origin $tmp_ssh_host |
This file contains 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 tcpdump -i enp2s0 tcp and port 80 -s0 -vv -X |
This file contains 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
SYNC TABLE | |
mysqldump --opt --user=<youruser> --password=<yourpassword> -host <yourhost> \ | |
<yourDB> <yourtable> | mysql -u <newserveruser> -p<password> |
This file contains 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
# Read | |
* https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html | |
* https://dev.mysql.com/doc/internals/en/join-buffer-size.html | |
# Tools | |
* https://github.com/major/MySQLTuner-perl |
This file contains 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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
#color pallete | |
set -g default-terminal "screen-256color" | |
# Enable mouse control (clickable windows, panes, resizable panes) | |
#set -g mouse-select-window on |
This file contains 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
Tooling integration with the official sublime-build plugin. | |
Automatic formatting with the Gofmt plugin and goimports. | |
Code linting with the SublimeLinter plugin and gometalinter. | |
Autocompletion with the gocode package. | |
Code navigation with the GoGuru plugin. | |
Snippet management with Sublime Text's inbuilt tool and the PackageResourceViewer plugin. | |
https://www.alexedwards.net/blog/streamline-your-sublime-text-and-go-workflow |
This file contains 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
[mysqld] | |
log_error=/var/log/mysql/mysql.error.log | |
general_log_file=/var/log/mysql/mysql.general.log | |
general_log=1 | |
; slow_query_log=0 | |
; slow_query_log_file=/var/log/mysql/mysql.slow.log | |
; long_query_time=1 | |
; log-queries-not-using-indexes |
This file contains 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
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman | |
Exec=postman | |
Icon=/opt/Postman/app/resources/app/assets/icon.png | |
Terminal=false | |
Type=Application | |
Categories=Development; | |
EOL |
This file contains 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 | |
sed "s/;/\t/g" $1 | less -S |
NewerOlder