Skip to content

Instantly share code, notes, and snippets.

@jneuendorf-i4h
jneuendorf-i4h / download_vsix.py
Last active January 26, 2025 04:45
Download VSIX from VSCode Marketplace URL (e.g. for VSCodium if OpenVSX does not provide the extension)
"""Based on https://stackoverflow.com/a/38866913/23325241"""
import re
# Attempt to import requests and handle if it's missing
try:
import requests
requests_available = True
except ImportError:
requests_available = False
@powergun
powergun / calculate.py
Last active January 26, 2025 04:33
A python function to calculate LLM GPU requirement (approximation)
"""
See test() for a quick example.
For ollama users, use `ollama show <model>` to find the parameter and quantization details.
"""
import re
from typing import Optional, NamedTuple

g.co, Google's official URL shortcut (update: or Google Workspace's domain verification, see bottom), is compromised. People are actively having their Google accounts stolen.

Someone just tried the most sophisticated phishing attack I've ever seen. I almost fell for it. My mind is a little blown.

  1. Someone named "Chloe" called me from 650-203-0000 with Caller ID saying "Google". She sounded like a real engineer, the connection was super clear, and she had an American accent. Screenshot.

  2. They said that they were from Google Workspace and someone had recently gained access to my account, which they had blocked. They asked me if I had recently logged in from Frankfurt, Germany and I said no.

  3. I asked if they can confirm this is Google calling by emailing me from a Google email and they said sure and sent me this email and told me to look for a case number in it, which I saw in

My Personal Constitution: A Living Document

Preamble: Embracing the Flow of Existence

This Personal Constitution is a living document, reflecting my ongoing journey of self-discovery and engagement with the world. It is not a rigid set of rules, but a guiding framework based on the truths I have found in my experiences, thoughts, and explorations. It emphasizes embracing the dynamic nature of life, the pursuit of knowledge and wisdom, and the importance of contributing positively to humanity.

Core Values:

1. The Pursuit of Knowledge and Wisdom: A Lifelong Journey

@KazaiMazai
KazaiMazai / CollectionView.swift
Last active January 26, 2025 04:32
Better SwiftUI wrapper for UICollectionView
import SwiftUI
extension CollectionView {
typealias UIKitCollectionView = CollectionViewWithDataSource<SectionIdentifierType, ItemIdentifierType>
typealias DataSource = UICollectionViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>
typealias Snapshot = NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>
typealias UpdateCompletion = () -> Void
}
struct CollectionView<SectionIdentifierType, ItemIdentifierType>
@proffapt
proffapt / azure-openvpn-setup.md
Last active January 26, 2025 04:26
Elaborated step by step guide to setup OpenVPN on Azure via student discount

PWM fan control in Linux with a Gigabyte Aorus motherboard

  • install lm-sensors with your package manager

sensors

If it won't show any fan/speed, continue

sensor-detect

@prateekrajgautam
prateekrajgautam / Guide: Cloudflare Tunnel with Nginx Proxy Manager.md
Last active January 26, 2025 04:17
Guide: Cloudflare Tunnel with Nginx Proxy Manager

Thought I should post my guide on how to do this, as I've struggled with this for quite some time now. I wanted something to bypass the NAT/router as I did not have the option of port-forwarding. I will also be moving quite some in the upcoming year, so dynamic IP was almost a given. And obviously I wanted it to be cheap. This does it all.

This is free, no port-forwarding required and no static IP required. Wildcard domain and SSL certificate supported. It works with Cloudflare tunnels, Cloudflare DNS, Nginx Proxy Manager and obviously TrueNAS SCALE.

I am not a professional, if you see a flaw in this design, please let me know!

Requirements:

  • Domain name at Cloudflare
@jesus-rodriguez-layos
jesus-rodriguez-layos / ProgressBarComposable.kt
Created January 14, 2025 17:43
🎨 A customizable Jetpack Compose progress bar with BlendMode.SrcOut for smooth animations and dynamic content rendering
package com.jrl.sandbox
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box