Skip to content

Instantly share code, notes, and snippets.

View 101v's full-sized avatar

Vimal 101v

View GitHub Profile
@101v
101v / gist:0a91a5c3a2a432cf328affe6a4890891
Created February 11, 2025 08:04
How to resolve ERR_SSL_BAD_RECORD_MAC_ALERT error in Google Chrome
h2. MTU stands for **Maximum Transmission Unit**, and it refers to the largest size of a data packet that can be sent across a network without needing to be fragmented; essentially, it's the maximum amount of data that can be sent in a single transmission on a specific network connection.
h2. How it affects Google Chrome:
h3. Network performance:
If a network has a low MTU, it can significantly impact browsing speed in Google Chrome because data needs to be split into smaller packets, leading to increased processing overhead and potential delays in loading webpages.
h3. Packet loss:
When a packet is too large for a network's MTU, it can be fragmented, increasing the chance of packet loss during transmission, which can result in lagging or interrupted browsing experiences in Chrome.
@101v
101v / shell.nix
Created October 31, 2022 11:13
shell.nix for elixir
{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
buildInputs = with pkgs; [
elixir
nodejs
pgcli
];
}
@101v
101v / shell.nix
Last active October 31, 2022 11:14
shell.nix file for rust
{pkgs ? import <nixpkgs> {}}: let
cargo-run-bin = pkgs.rustPlatform.buildRustPackage rec {
pname = "cargo-run-bin";
version = "0.3.1";
src = pkgs.fetchCrate {
inherit pname version;
sha256 = "sha256-4zu3vXlGKmBlB5we3qR0V6LIALqPxVGosBF4EkO7aHE=";
};
cargoSha256 = "sha256-B5SCZDdfvrE3HeVVX79W6gvxxIiiVX3PrIWG2jR5VgA=";
};
@101v
101v / git_extraConfig
Created August 12, 2022 09:13
Setup git defaultBranch as extraConfig in nix
programs.git = {
enable = true;
userName = "Vimal Patel";
userEmail = "[email protected]";
extraConfig = {
init = { defaultBranch = "main"; };
};
};
@101v
101v / NatualScrollingInWindows.ps1
Created January 18, 2017 21:19
Powershell script to enable natural scrolling in Windows
# View registry settings
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
# Change registry settings
# Reverse mouse wheel scroll FlipFlopWheel = 1
# Normal mouse wheel scroll FlipFlopWheel = 0
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
# Restore default scroll direction
# Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 1 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 0 }
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
namespace EventStoreService
{
public class EventStoreService
{
function inPlacePrinter() {
console.log("\u001B[2J\u001B[0;0f");
console.log(arguments[0]["toString"]());
}