Script

Filter
2025-03-08

Favicon

Html
How to include a favicon to your site.
<!-- jpg, png, ico, gif, svg - 96 x 96 or bigger -->
<link rel="icon" type="image/jpg" href="favicon.jpg">
2025-02-18

NSLookup

Windows
Hur hittar man ip-adress från domännamn, eller domännamn från ip-adress?
# Get ip:
nslookup rosiro.com

# Get domain:
nslookup -type=PTR 85.118.206.138

# Get DNS:
nslookup -type=NS rosiro.se
2024-09-19

Undvik Wordpressattack

Security
Lägg in koden i (dot)htacess
<Files xmlrpc.php>
Order Allow,Deny
Deny from all
</Files>
2024-09-18

Remove Mac junk files

Windows
Windows command to delete all hidden junk files that comes when you open mac folders in windows
1
Open cmd and navigate to the folder to search, then run these commands:

rmdir /s /q __MACOSX
del /s /q /f /a .DS_STORE

del /s /q /f /a ._.* (only if there are no other files you need to keep
like chrome settings, eclipse files etc)

/s include subdirectories
/q quiet mode, do not ask
/f force deleting of read only files
/a Select files to delete based on attributes
2023-12-10

Ändra många fil-namn

Windows
Ändra namn på många filer samtidigt I Windows 10
2
1. Öppna Powershell
2. Gå till rätt katalog med cd och ls
3. Skriv: ls | Rename-Item -NewName { $_.Name -replace "x","y" }
Ändra x till det som ska ändras (innanför citat)
Ändra y till det som det ska ändras till (innanför citat)
OBS! Det här ändrar ALLA förekomster av "x" i filnamnen till "y"

Alternativ om man vill ta bort ett prefix i filnamnen på många filer samtidigt:
1. Öppna kommandotolken
2. Gå till rätt katalog med cd och dir
3. Skriv rename "*" "///*"
Skriv så många slashar som tecken som ska tas bort från början av varje filnamn (3 st i exemplet)
🙂