Skip to content

Instantly share code, notes, and snippets.

View rebooting's full-sized avatar
💭
Usually working on some Go project

Alvin rebooting

💭
Usually working on some Go project
View GitHub Profile
@rebooting
rebooting / gist:c9096eef0cfcaffcad117699b6de933c
Created February 1, 2025 00:56
python ssl error ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac

The error message you are seeing (ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac) is related to SSL and may not be specifically related to Python or pip. It's possible that the issue could be due to network conditions, SSL/TLS settings, or potentially hardware issues.

In the meantime, you might consider trying the following steps:

Update your pip, setuptools, and wheel. Outdated versions of these packages can sometimes cause issues. You can update them with the following commands:

pip install --upgrade pip setuptools wheel

@rebooting
rebooting / alpine-vs.sh
Created September 9, 2024 15:28
vscode alpine
# This is what make vscode remote-ssh work
apk add gcompat libstdc++ curl git
@rebooting
rebooting / term.md
Created December 12, 2023 17:01
Configure Visual Studio Code to run MSYS2 Bash

In VSCode (2023)

Hit F1, "Preference: Open User Settings (JSON)

add:

    "terminal.integrated.profiles.windows": {
        "msys64 - bash": {
@rebooting
rebooting / git.md
Created August 13, 2023 01:44
[Git] how do I delete local branches that no longer exist on remote

git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -d

@rebooting
rebooting / Param.razor
Created August 9, 2023 09:29
Sample Razor page to demonstrate how to get the query string from the navigation manager .Net 7
@page "/sample"
/**
Sample Razor page to demonstrate how to get the query string from the navigation manager
*/
// inject navigation manager
@inject NavigationManager NavManager
<div>
<h3>Test</h3>
<p>Query string: @ParamDictJson</p>
@rebooting
rebooting / telegram.cs
Last active August 9, 2023 02:03
quick and dirty c# script to send Telegram message to chatID
// dotnet add package Telegram.Bot
using Telegram.Bot;
using Telegram.Bot.Exceptions;
using Telegram.Bot.Polling;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
var keyFromEnv = Environment.GetEnvironmentVariable("TELEGRAM_BOT_API_KEY");
if (keyFromEnv is null)
@rebooting
rebooting / Resize.sh
Last active March 18, 2023 11:14
resize image with only ffmpeg ( if you don't want to install ImageMagick)
```
#!/bin/sh
for file in *.png
do
ffmpeg -i $file -vf scale=720:-1 "Small-$file.png"
done
@rebooting
rebooting / Loudness.json
Created February 28, 2023 00:28
PulseAudio Config for Ubuntu 22.04
{
"spectrum": {
"show": "false",
"n-points": "100",
"height": "120",
"use-custom-color": "false",
"fill": "true",
"show-bar-border": "true",
"sampling-freq": "10",
"line-width": "2",
@rebooting
rebooting / custom_sftp.py
Created January 14, 2023 14:36 — forked from lonetwin/custom_sftp.py
Replacing openssh's external sftp server with a custom sftp server based on paramiko [DEPRECATED -- please see comment]
#!/usr/bin/env python
# A more detailed explaination will come as a blog post soon, but in brief,
# here is the problem that led to this:
#
# For various reasons we have a requirement to implement an 'sftp' like
# abstraction/interface for a service that we provide. Basically we need to
# present objects in our application as a filesystem accessible over sftp.
#
# The way we have decided to go about this is to replace the 'standard' openssh
# sftp subsystem command entry in /etc/ssh/sshd_config on our servers with our
@rebooting
rebooting / managedprefix.go
Last active June 16, 2022 00:45
gets entries from a specific managed prefix list in AWS Go V2 SDK
package main
import (
"context"
"flag"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"