Jan 1, 2022
· 1 minute read
Happy New Year
Ambition this year, to write an article every day …
This one does not count :-)
Mar 28, 2021
· 1 minute read
sql server
SQL Server doesn’t really support ‘create or alter’, at least not until 2019 where support starts to appear.
This is an elegant way of updating stored objects without dropping them.
This technique retains any granted permissions.
From Stackoverflow thread
—- Stored Procedure IF OBJECT_ID('[dbo].[<Name_Of_Routine, , >]') IS NULL EXEC('CREATE PROCEDURE [dbo].[<Name_Of_Routine, , >] AS SET NOCOUNT ON;') EXEC('GRANT EXECUTE ON [<Name_Of_Routine, , >] TO Public AS dbo;') GO ALTER PROCEDURE .
Read On →
Mar 27, 2021
· 1 minute read
bash
I needed to find my external IP address from bash command line.
Quite easy:
$ curl -s http://whatismyip.akamai.com That URL also works in a browser.
Dec 26, 2020
· 1 minute read
websecurity
Updated Jan 2022 - Added Cloudflare note on protectingdomains without email.
See Gov.UK article
And Ryan Castelluci on Twitter
If you have domains that you’re not using for email, please set up DNS records to prevent spammers from using them.
. TXT "v=spf1 -all" . MX . 0 _dmarc. TXT "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s" *._domainkey. TXT "v=DKIM1; p="
Dec 20, 2020
· 1 minute read
linux
From: https://fanf.dreamwidth.org/133823.html
Leap seconds exist because the Earth takes (very roughly) about a millisecond more than 24 * 60 * 60 seconds to rotate each day; when we have accumulated enough extra milliseconds, a leap second is inserted into UTC to keep it in sync with the Earth. At the moment the Earth is rotating faster than in recent decades: these shorter days, with a lower length-of-day, means the milliseconds accumulate more slowly, and we get fewer leap seconds.
Read On →