Skip to content

Instantly share code, notes, and snippets.

@jacky9813
jacky9813 / install-nv-driver-fc41.md
Created October 31, 2024 01:47
Install NVIDIA proprietary driver on Fedora 41

There are some steps that is not documented in the RPMFusion's installation guide. Here's how I install NVIDIA driver on Fedora 41.

  1. Update all packages and reboot
  2. Install akmod-nvidia from RPMFusion, optionally with packages for CUDA or NVENC.
  3. For some reason, after akmod installation, I didn't see modeset=1 on kernel option, so:
#!/bin/bash
@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active January 16, 2025 23:12
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • AutoGate
    Gates open automatically when you approach and close behind you.

  • Better Sprinklers Plus
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

import json
import re
import yfinance as yf
from txtai import Embeddings
from txtai.pipeline import Textractor
def djia():
"""
@Softwave
Softwave / README.md
Last active January 16, 2025 23:11
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

@luigi-ms
luigi-ms / .vimrc
Last active January 16, 2025 23:11
Mine Vim/NeoVim config
" Basic Configs
syntax on
filetype on
filetype plugin indent on
set encoding=utf-8
set title
set number
set cursorline
@nviet
nviet / stable-diffusion-webui-termux.md
Last active January 16, 2025 23:09
Install stable-diffusion-webui on Termux (Android) + PRoot

Install stable-diffusion-webui on Termux (Android) + PRoot

This will guide you on installing AUTOMATIC1111/stable-diffusion-webui on Termux (Android) + PRoot Distro. Make sure that you have a high-end phone to actually make this usable. On my phone with 8GB RAM, launch the webui alone take at least ~ 2 GB RAM, thus making it impossible to load any model and process further.

1. Prerequisites

First you have to install Termux and install PRoot. Then install and login to Ubuntu in PRoot

2. Installing AUTOMATIC1111/stable-diffusion-webui

@es3n1n
es3n1n / idadefs.h
Last active January 16, 2025 23:05
latest definitions for hexrays decompiler output
/*
This file contains definitions used in the Hex-Rays decompiler output.
It has type definitions and convenience macros to make the
output more readable.
Copyright (c) 2007-2022 Hex-Rays
*/
@ramsey
ramsey / remove-followers.js
Last active January 16, 2025 23:03 — forked from JamieMason/unfollow.js.md
Remove everyone following you on twitter.com
// Remove everyone following you on twitter.com
// https://gist.github.com/ramsey/bdeefda66d6e2294d3466edcea30187b
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/followers
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// If you start seeing error messages in the console with the code
// "429," this means Twitter is rate-limiting you. Stop the script
// (i.e., reload or close the browser tab), and try again later.
@philschmid
philschmid / get_memory_size.py
Created January 16, 2025 13:53
Get needed GPU per precision for a Hugging Face Model Id
from typing import Dict, Union
from huggingface_hub import get_safetensors_metadata
import argparse
import sys
# Example:
# python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct
# Dictionary mapping dtype strings to their byte sizes
bytes_per_dtype: Dict[str, float] = {
@JamieMason
JamieMason / unfollow.js.md
Last active January 16, 2025 23:01
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

By @foldleft.bsky.social, see also Unfollow everyone on bsky.app.

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)