Skip to content

Instantly share code, notes, and snippets.

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.

@Tw1sm
Tw1sm / decrypt_cookies.py
Last active January 28, 2025 14:46
Decrypt Slack/Chrome Cookies
import sqlite3
import sys
import json
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
kSalt = "saltysalt"
kDerivedKeySizeInBits = 128
kEncryptionIterations = 1003
kEncryptionVersionPrefix = "v10"
@eli-kha
eli-kha / nicegui_webview_demo.py
Created March 11, 2023 20:36
A small demo of using pywebview with NiceGUI based on wrapping both Unicorn.Server and webview in processes.
#!/usr/bin/env python3
import multiprocessing
import tempfile
from fastapi import FastAPI
from uvicorn import Config, Server
import webview
from nicegui import ui
@indeedhat
indeedhat / notion.bat
Last active January 28, 2025 14:45
add notion.so to your hosts file (windows)
@echo off
echo 104.26.4.98 notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.5.98 notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.4.98 www.notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.5.98 www.notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.4.98 *.notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.5.98 *.notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.4.98 msgstore.www.notion.so >> C:\Windows\System32\drivers\etc\hosts
echo 104.26.5.98 msgstore.www.notion.so >> C:\Windows\System32\drivers\etc\hosts
From c814d07190a645dcce33e4407c6f6d8bb7ebaef2 Mon Sep 17 00:00:00 2001
From: Aleksandrs Vinarskis <[email protected]>
Date: Tue, 12 Dec 2023 20:52:43 +0100
Subject: [PATCH 1/1] ALSA: hda: cs35l41: Dell Fiorano add missing _DSD properties
Dell XPS 9530 (2023) has two SPI connected CS35L41 amplifiers, however
is missing _DSD properties, cs-gpios and has a firmware bug which caps SPI
controller's speed to unusable 3051Hz. This patch adds _DSD properties and
sets second cs-gpio. In case SPI speed bug is detected, it will not
initialize the device to avoid hangs on wake up.
@todgru
todgru / elasticsearch-setup-apple-macbook-pro-m1.md
Created February 9, 2023 23:52
Install Elasticsearch 7.x on Apple Macbook Pro M1 Ventura 13.2

Elasticsearch Setup Apple MacBook Pro M1

Apple MacBook Pro M1, 32 GB, Ventura 13.2

Documentation based on comments in this Github Elasticsearch issue.

Install Homebrew