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
set tabsize 4 | |
set tabstospaces |
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
# create new partition | |
sudo fdisk /dev/sda | |
# in fdisk console | |
n - add a new partition | |
p - print the partition table | |
w - write table to disk and exit | |
q - quit without save changes | |
# make file system |
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
# download from web-site | |
wget https://example.com/file.zip | |
# continue from interrupt | |
wget -c https://example.com/file.zip | |
# new file name | |
wget -O newname.zip https://example.com/file.zip | |
# new path |
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
# save to file | |
curl -O https://example.com/file.zip | |
# new file name | |
curl -o newname.zip https://example.com/file.zip |
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
Create the RAID: Use the command | |
```bash | |
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc | |
``` | |
to create a RAID 1 with two disks. This combines two disks (/dev/sdb and /dev/sdc) | |
into a virtual device named "/dev/md0". | |
``` |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
type ErrNegativeSqrt float64 | |
func (e ErrNegativeSqrt) Error() string { |
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/sh | |
nocolor='33[0m'; | |
color0='33[0;30m'; | |
color1='33[0;31m'; | |
color2='33[0;32m'; | |
color3='33[0;33m'; | |
color4='33[0;34m'; | |
color5='33[0;35m'; | |
color6='33[0;36m'; | |
color7='33[0;37m'; |
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
https://askubuntu.com/questions/895492/kernel-panic-vfs-cannot-open-root-device-or-unknown-block-error-6 | |
sudo update-initramfs -u -k $(uname -r) | |
https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0 | |
sudo fdisk -l | |
sudo mount /dev/sda2 /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts |
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
echo '.list_container.hide{margin-bottom:50px !important}' >> themes/original/css/theme.css | |
sed -i 's/#pma_navigation{background:#fff;/#pma_navigation{background:#d00;/g' themes/original/css/theme.css | |
sed -i 's/#pma_navigation_tree li.selected{color:#000;background-color:#eee}/#pma_navigation_tree li.selected{color:#000;background-color:#b00}/g' themes/original/css/theme.css | |
sed -i 's/body{font-family:sans-serif;/body{font-family:Ubuntu,sans-serif;/' themes/original/css/theme.css | |
sed -i '5,9d' templates/login/header.twig |
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
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 |
NewerOlder