Skip to content

Instantly share code, notes, and snippets.

@TheGreatSageEqualToHeaven
TheGreatSageEqualToHeaven / LuauOptimizeLevel.lua
Created March 28, 2024 01:34
Getting the Luau optimize level at runtime safely
local function getOptimizeLevel()
local function dupclosure()
return function() end
end
local O0 = dupclosure() ~= dupclosure()
local function inlinefunction()
return debug.info(1, "f")
end

Learning Plan for Design Patterns and Principles of Good Design

These learning resources primarily focus on programming using Good Design Principles and Design Patterns

  • There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
@Pen-y-Fan
Pen-y-Fan / Test Driven Development (TDD) Learning Plan.md
Last active January 28, 2025 14:58
Test Driven Development (TDD)

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@DanShaders
DanShaders / sink-eq6.conf
Last active January 28, 2025 14:57
PipeWire Equalizer Settings for Dell XPS 15 (2023)
# 6 band sink equalizer
#
# Copy this file into a conf.d/ directory such as
# ~/.config/pipewire/filter-chain.conf.d/
#
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Internal Speakers Equalizer Sink"
media.name = "Internal Speakers Equalizer Sink"
@letsautomatenet
letsautomatenet / ESPHome YAML Template - ESP32.yaml
Created January 13, 2024 18:32
ESPHome YAML Template - ESP32
### START - Update this section with relevant details ###
substitutions:
device_name: "device-name-here"
friendly_name: Device Name Here
board_type: esp32dev
framework: esp-idf # arduino or esp-idf (recommended for ESP32)
# ESPHome API used by Home Assistant, etc

Windows 10 - Using Git Bash With TMUX

Why Not Use WSL?

I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.

That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there

@Aldaviva
Aldaviva / wmp_h.265_hevc.md
Last active January 28, 2025 14:51
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the AppxBundle file.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .AppxBundle filename and save it as that instead.
@lakshmantgld
lakshmantgld / salesTax.md
Last active January 28, 2025 14:50
Free Sales Tax API based on Postal code by Avalara

Sales Tax API

There are many companies providing sales tax API. Out of all the companies, Avalara offers free API service for sales Tax. This gist is all about setting up avalara API and querying it.

The Free-To-Use API by avalara has some restrictions. Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP response code 429 - Too Many Requests. The requirement for this API is to create an avalara free trail account. You can create a free account using this link create free account.

Once you have filled the form from above link, you will get an e-mail containing temporary credentials to login the avalara account. The e-mail will look something like this:

Avalara e-mail

@empeje
empeje / .gitlab-ci.yml
Created April 3, 2021 10:34
API Docs Using Swagger + Redoc
pages:
image: node:latest
stage: deploy
script:
- npm install -g redoc-cli
# public/index.html is the output
# documentation/openapi.yaml is the input
- redoc-cli bundle -o public/index.html documentation/openapi.yaml
artifacts:
paths:
@derrod
derrod / legendary_origin.md
Last active January 28, 2025 14:48
Star Wars Battlefront II on Linux via Legendary

Installing Star Wars: Battlefront II with Legendary

The game is not installed or downloaded via Epic, instead the Epic Games Launcher launches Origin to link your account to install the game. This can be done manually to still be able to install and download the game without the Epic Games Launcher.

Installing Origin

Origin needs to be installed and working for this, please consult https://github.com/lutris/docs/blob/master/Origin.md for how to get it running on Linux via Lutris.

On Windows Origin just needs to be installed and ideally updated to the current version.