Script

Filter
2023-07-23

Vertical placement

Css
Using Flexbox to control vertical placement
1
<div style="display:flex; flex-direction:column; height:300px;">
	<div style="background:red;">Top</div>	
	<div style="background:green; flex-grow:1;">Flexible content</div>
	<div style="background:blue;">Bottom</div>
</div>
2023-06-08

Säkrare webbläsare

Security
3 tips för att surfa säkrare.
1. Aktivera spårningsskydd
FF: Sekretess & säkerhet, Förbättrat spårningsskydd: strikt

2. Aktivera säker DNS
FF: Sekretess och säkerhet, Aktivera säker DNS: Förstärkt skydd

3. Minimera tillägg
2021-12-24

Installera gammal HP-skrivare som krånglar i Windows 10

Windows
Problemet kan vara att gamla drivrutiner som inte fungerar ligger kvar och blockerar.
3
1. Please remove any existing copy of your printer by selecting Remove Device, then reboot your computer.
2. Next, right-click the Start icon and select Run, paste the following and press OK: printui /s /t2
3. Remove any listed HP printer, be sure to select Remove driver and driver package, press OK and confirm any prompt.
4. Plug in the printer (usb) and let windows find the driver.
2021-07-22

Local Apache sites

Php
Script som visar länkar till alla virtuella hosts i en WAMP-installation
2
<?php
echo "<!DOCTYPE html>
<html>
<title>Local Sites</title>
<body>";
$lines = file("c:/wamp64/bin/apache/apache2.4.37/conf/extra/httpd-vhosts.conf");
foreach ($lines as $line) {
	$words = preg_split("/[\s]+/", trim($line)); // " ", \r, \t, \n, \f
	if ($words[0] == "ServerName") {
		echo "<a href=\"http://{$words[1]}\">{$words[1]}</a><br />";
	}
}
echo "</body>
</html>";
?>
2021-05-04

Tonad bakgrund

Css
Tonad bakgrund, här med animation
1
body {
	background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
	background-size: 400% 400%;
	animation: gradient 15s ease infinite;
}

/* alt: radial-gradient(position, shape or size, colorstops) */

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}
🙂