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
| alias compose-ps="docker ps --format 'table {{ .Names }}\t{{ .Status }}\t{{ .Label \"com.docker.compose.project\" }}\t{{ .Label \"com.docker.compose.service\" }}\t{{ .Label \"com.docker.compose.project.working_dir\" }}'" | |
| alias dps="docker ps -a --format 'ID: {{.ID}}\nNames: {{.Names}}\nProject: {{.Label \"com.docker.compose.project\"}}\nPorts: {{.Ports}}\nStatus: {{.Status}}\n'" | |
| dc() { | |
| project=$1 | |
| container=$2 | |
| check=echo $project | grep "laravel" | |
| if [ -z $check ]; then |
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
| IPV6=no | |
| ufw allow 11200:11299/tcp |
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 netplan generate | |
| $ sudo netplan apply | |
| $ sudo netplan --debug apply | |
| $ sudo vim /etc/netplan/50-cloud-init.yaml | |
| # Dynamic IP address assignment (DHCP client) examples; | |
| network: | |
| version: 2 | |
| renderer: networkd | |
| ethernets: |
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
| AuthUserFile /etc/proftpd.passwd | |
| RequireValidShell off | |
| ListOptions -la | |
| PassivePorts 12000 12100 | |
| MasqueradeAddress 111.112.10.11 |
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
| nmap -Av -sT 10.10.10.20 |
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
| listen_port=2221 | |
| local_umask=002 | |
| pasv_enable=YES | |
| pasv_max_port=50000 | |
| pasv_min_port=40000 | |
| pasv_address=111.112.11.12 | |
| pasv_addr_resolve=NO | |
| listen_ipv6=no |
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
| [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx | |
| # A job stop of running process... | |
| $ sudo dpkg-reconfigure tzdata | |
| # install putty tools | |
| sudo apt install putty-tools | |
| # .pem to .ppk convert | |
| puttyget file.pemo -o file.ppk |
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
| # QueryString алып тыстау керек. ?a=b | |
| Route::path() - Route::any('/system/users/:operation/:ID', 'system'); "/system/users" деген жолды алып береді. | |
| RewriteCond %{REQUEST_URI} !-d | |
| RewriteRule ^(.*/\w+[^/])$ /$1/ [L,R] | |
| RewriteCond %{REQUEST_URI} ^/system[^.] | |
| RewriteRule ^(.*)$ index.php?$1 [END,QSA] | |
| RewriteCond %{REQUEST_URI} ^/$ | |
| RewriteRule ^(.*)$ /kz/ [R,END] | |
| RewriteCond %{REQUEST_URI} ^/([a-zA-Z0-9-_]+)\.(css|gif|ico|jpe?g|js|png|woff?2)$ [NC] | |
| RewriteRule ^(.*)$ /public/%2/%1.%2 [END] |
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 select-editor | |
| sudo update-alternatives --config editor |
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
| Show swap | |
| sudo swapon --show | |
| sudo fallocate -l 1G /swapfile | |
| sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| sudo nano /etc/fstab | |
| /swapfile swap swap defaults 0 0 |