You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secure Short Unique IDs (for generating Invites Codes or Promo Codes or URL slug from Postgres Database)
What
This is open-source code that lets you generate short unique identifiers from numbers (within Postgres DB). These IDs are URL-safe, can encode several numbers, and do not contain common profanity words.
Presented by Evadne Wu at Code BEAM Lite in Stockholm, Sweden on 12 May 2023
Synopsis
We have celebrated 10 years of Elixir and also nearly 25 years of Erlang since the open source release in December 1998.
Most of the libraries that were needed to make the ecosystem viable have been built, talks given, books written, conferences held and training sessions provided. A new generation of companies have been built on top of the Elixir / Erlang ecosystem. In all measures, we have achieved further reach and maturity than 5 years ago.
Reverse Mouse Wheel scroll in Windows 11 (Natural Mode like MacOS)
Reverse Mouse Wheel scroll in Windows 11
Chose between natural mode like MacOS or Windows default mode.
Step 1: Open Windows PowerShell in Administrator Mode.
You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.
Step 2: Copy the following code and paste it in the command line of Windows PowerShell:
$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
ActiveRecord Connection Lifetime controls for using postgres with an autoscaling pgbouncer service safely
This file contains 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
This file contains 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
Ubuntu 20.04 on a 15" Retina MacBook Pro (Mid-2014)
Ubuntu 20.04 on a 15" Retina MacBook Pro (Mid-2014)
These are notes from my efforts to get Ubuntu 20.04 installed on my older MacBook Pro. I'm making this gist public in the hopes that it's helpful to others.
I did a Minimal install, but selected the option to install additional 3rd-party drivers.
Wifi doesn't work during the install (because it requires a 3rd-party driver), so you won't be able to choose to download updates while installing. No big deal, run a software update after the install.
The installer takes about 25 minutes to complete. Post-install, most things work. The only driver I had to manually install was for the FaceTime camera. More on that below.
This gist is to configure a Mosquitto MQTT Broker behind a Traefik reverse-proxy, both in a docker container.
Mosquitto will be configuread as a TCP Service.
This is a simple configuration used on the same single server. Probably to be adapted for other cases.
Having mosquitto behind a reverse proxy enables you to configure TLS on Traefik (likely you already do that for other applications as well) and to load balance different MQTT instances, but that goes beyond this gist.
This file contains 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