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
RESTORE DATABASE dbname FROM DISK = 'C:\whatever\dbname.bak' | |
WITH MOVE 'dbname_data' TO 'C:\...\dbname.mdf', | |
MOVE 'dbname_log' TO 'C:\...\dbname.ldf'; |
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
BACKUP DATABASE VI_GenericRetail TO DISK = 'C:\exports\VI_GenericRetail.bak' | |
WITH COPY_ONLY, INIT, NO_COMPRESSION; |
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
ALTER TABLE dbo.YourTable | |
ADD ID INT IDENTITY | |
CONSTRAINT PK_YourTable PRIMARY KEY CLUSTERED |
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
bcp McD.dbo.Stores in E:\bcp\Stores.dat -S localhost -n -Usa -Ppassword |
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
bcp McD.dbo.Stores out E:\bcp\Stores.dat -S localhost -n -Usa -Ppassword |
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
wget -i images.txt |
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
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/products.csv' | |
INTO TABLE inzynierka.product | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
IGNORE 1 ROWS; |
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
Find: "(\d),(\d)(\d) zł" | |
Replace: $1.$2$3 | |
Example: | |
It replaces expression "3,49 zł" to 3.49 |
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
robocopy "F:\VM" "I:\SSD_bck\VM" /e /MT:16 /NP /NFL /NDL |
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
iptables -F | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT DROP | |
#icmp | |
iptables -A OUTPUT -o eno16777728 --proto icmp -m icmp --icmp-type echo-request -j ACCEPT | |
iptables -A INPUT -i eno16777728 --proto icmp -m icmp --icmp-type echo-reply -j ACCEPT | |
#dns | |
iptables -A OUTPUT -o eno16777728 -p udp -m udp --dport 53 -m state --state NEW -j ACCEPT | |
iptables -A INPUT -i eno16777728 -p udp -m udp --sport 53 -m state --state ESTABLISHED,RELATED -j ACCEPT |