Skip to content

X Posts

Updated to MacBook Air M1

Recently updated to a MacBook Ari M1. I’ve never been a fan of Apple products but I found it on sale and I was doing more work with Linux, Golang, and Docker so this met my needs. It was either this or find a good laptop for Linux.

Please visit my Mac page for more information on apps I’ve started to used for development.

Leave a Comment

Unraid Upgrade – EMC KTNSTL3

I recently updated my Unraid to use an EMC KTNSTL3 storage array. I use a lot of small drives which are really cheap.

So far it’s working great. Bought it on eBay.

https://www.ebay.com/itm/284306911248

I’m using SATA drives so you need to buy the Interposers. They turn your SATA into SAS drives so they fit in the caddy.

You’ll need 15 of them otherwise you can use straight SAS drives.

There does appear to be one quirk you need to know. Only one set of the SAS controllers reads SATA drives. I think it’s the bottom one so hook up your mini SAS cables there.

Also, I had some 14TB drives that I just installed and they kept giving me an “unsupported partition layout”. To fix this I just had to reboot the Unraid box. I’m not sure why but it worked after that.

You’ll also need a SAS card as well. I have the LSI 9200-8e. Something like the pic below. You can buy them on eBay too. I like this seller https://www.ebay.com/str/theartofserver .

There was some useful information below however it related to TrueNAS.

Leave a Comment

Finally, put a Spanish wordlist together.

I could finally put a Spanish wordlist together to tie it in with my Wordle Spanish app because the original dictionary I had was not very good and I was getting complaints about some words being used. It was true. I found some words in the original wordlist that were not even Spanish.

So here is the new list that was created with some help from other repos.

https://github.com/xavier-hernandez/spanish-wordlist

Leave a Comment

Macbook Tips

Didn’t know I could get granular with the sound and brightness settings.

TIMESTAMPS

00:00 Change Macbook Folder Icons

00:53 Disable Caps Lock Button on Mac

01:08 Customize View for System Preferences

01:34 Quickly Access Sound Preferences

02:10 Move Windows in Background

02:46 Show Menu Bar in Full Screen

03:08 Move Files to Location

03:51 Finder Window Management

04:20 Preview Files the RIGHT Way

05:07 Convert Images on Mac

05:31 Take Full Page Screenshots

Leave a Comment

IIS Crypto and Azure DevOps Agent SSL Issue

Ran across a problem all of a sudden with Azure DevOps agents giving me an SSL connection error. This seemed to be only affecting Windows 2012 R2 servers.

AgentServer] System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.

You’ll have to make sure to enable or re-enable the following ciphers by going into the Cipher Suites in IIS Crypto. This works even if you use the “Best Practices” or “PCI 3.2” template.

Also, enabling the “Server Defaults” template works as well because it re-enables those ciphers.

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

I found some information about this issue here: Azure DevOps Agent installed on Windows Server 2012 R2 unable to TLS1.2 handshake with Azure Devops Agent Server https://developercommunity.visualstudio.com/t/azure-devops-agent-installed-on-windows-server-201/1651426

IIS Crypto can be found here: https://www.nartac.com/Products/IISCrypto

Leave a Comment

Getting error An unhandled exception has occurred. See browser dev tools for details.

I deleted all the CSS from site.css and replaced it with mine of course but after that, I started receiving the following error “Getting error An unhandled exception has occurred. See browser dev tools for details. Reload”. It looks like this occurs because blazor needs at least 2 styles to display errors.

Found my answer here.

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

Leave a Comment

This is interesting about MS Teams.

The features below, in the Reddit article, have been put on hold by Microsoft but I didn’t realize they even existed. It makes sense, especially with big companies. Maybe I was just being short-sighted?

https://docs.microsoft.com/en-us/microsoft-365/compliance/communication-compliance?view=o365-worldwide

Leave a Comment

GoAccess for Nginx Proxy Manager Logs

This docker container should work out of the box with Nginx Proxy Manager to parse proxy logs. The goaccess.conf has been configured to only access proxy logs and archived proxy logs. No fuss, no muss.

The docker image scans and includes files matching the following criteria: proxy-host-*_access.log.gz proxy-host-*_access.log

Currently using GoAccess version: 1.5.5

Unraid container is also available.

https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager

Leave a Comment

PayPal Test Credit Card Numbers

Because I keep losing this content and old pages are coming up with 404s.

More information can be found here: https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_payflowpro_guide.pdf

AmountResult
$0 – $1000

RESULT value 0 (Approved)
$1001 – $2000Certain amounts in this range will return specific PayPal results and can be generated by adding $1000 to that RESULT value. For example, for RESULT value 13 (Referral), submit the amount 1013. If the amount is in this range but does not correspond to a PayPal result supported by this testing mechanism, RESULT value 12 (Declined) is returned
$2001+RESULT value 12 (Declined)
Credit Card TypeCredit Card Number
American Express378282246310005
American Express371449635398431
American Express Corporate378734493671000
Australian BankCard5610591081018250
Diners Club30569309025904
Diners Club38520000023237
Discover6011111111111117
Discover6011000990139424
JCB3530111333300000
JCB3566002020360505
MasterCard5555555555554444
MasterCard5105105105105100
Visa4111111111111111
Visa4012888888881881
Visa4222222222222
Note : Even though this number has a different character count than the other test numbers, it is the correct and functional number.
Processor-specific Cards
Dankort (PBS)76009244561
Dankort (PBS)5019717010103742
Switch/Solo (Paymentech)633110199999001
Leave a Comment

Spanish Wordle / Wordle Espanol

Cloned a Worlde repository and populated it with a Spanish wordlist.

https://wordle-es.xavier.cc/

Docker Image: https://hub.docker.com/r/xavierh/wordle-spanish-espanol

Leave a Comment

Custom Redirect for an HTTP 400 Bad Request in IIS

Had an issue redirecting 400 errors using httpErrors. Seems like you need to pass in existingResponse=”Replace” for it to work.

For more information : https://docs.microsoft.com/en-us/previous-versions/iis/settings-schema/ms690497(v=vs.90)

<httpErrors errorMode="DetailedLocalOnly" existingResponse="Replace">
            <remove statusCode="400" subStatusCode="-1" />
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="400" prefixLanguageFilePath="" path="https://somewhere/400.html" responseMode="Redirect" />
            <error statusCode="404" prefixLanguageFilePath="" path="https://somewhere/404.html" responseMode="Redirect" />
</httpErrors>
Leave a Comment

.NET and TLS

  • Before .NET 4.6 – TLS 1.1 is default and negotiations start down
  • .NET 4.6 – TLS 1.2 is default and negotiations start down
  • .NET 4.7 – the default value of this property is SecurityProtocolType.SystemDefault. This allows .NET Framework networking APIs based on SslStream (such as FTP, HTTP, and SMTP) to inherit the default security protocols from the operating system or from any custom configurations performed by a system administrator.
Leave a Comment

Database table location for aliases in Sitecore

Aliases in Sitecore can be found under the “SharedFields” table in the master and web databases.

FYI… I don’t recommend updating records via SQL as goes with any Sitecore data. You have to remember that there can be multiple versions of content. Use the content editor when you can.

Here is a sample query. This might not work for all cases.

select * from SharedFields sf
inner join Items i on i.id = sf.ItemId
where i.ParentID in (select ID from Items where Name = 'Aliases')
and sf.FieldId in (select ID from Items where Name = 'Linked item')

Leave a Comment

.net core api to retrieve dns records

Built a .net core api using swagger, dnsclient.net, and rollbar. Have a look here https://github.com/xavier-hernandez/dnsclient-api .

Here is the README:

I created a YAML file built on OpenAPI 3.0 standards for my endpoints(paths) and models. I generated the stub code on https://editor.swagger.io/ then tweaked, fixed, and updated the code. Creating the stub code really gives a great head start.

I kept authentication simple, it’s using an API key sent in the header request. Currently the API key is hardcoded to “1” but maybe later I’ll use a database or something to store API keys. I might host this somewhere if it’s something I find interesting to host. Tie it maybe to a MySQL/MariaDB database.

The library being used to retrieve DNS information is called DnsClient.NET https://github.com/MichaCo/DnsClient.NET and available as a nuget package.

I’m also using https://rollbar.com/ which is an easy way to log errors and information. Maybe if I host it on Azure I’ll use Application Insights.

Leave a Comment