Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 15, 2024 07:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@padeoe
padeoe / README_hfd.md
Last active May 15, 2024 07:52
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@carlcidromero
carlcidromero / neomutt-setup.md
Last active May 15, 2024 07:50
Basic Setup For Multiple Gmail Accounts In Neomutt

Basic Setup For Multiple Gmail Accounts In Neomutt

Just started using Neomutt, so my setup is still very basic.
It was quite a headache getting it to work with multiple Gmail accounts.
Hopefully the information below helps you and future me.

References

@Spongert
Spongert / TMPro-Billboard.shader
Created July 5, 2019 12:14
Unity TextMeshPro Billboard / always facing camera shader
Shader "TextMeshPro/Distance Field-BillboardFacing"
{
// Billboarding version for TextMeshPro (tested in 2018.3), based on default Distance Field shader.
// ** Important part is to DISABLE the dynamic batching! (happens in this shader) **
// ...Took a while to figure out that one.
//
// Use as you like!
// - Almar
@ardakazanci
ardakazanci / RulerView.kt
Created April 28, 2024 06:15
RulerView - Jetpack Compose
@Composable
fun RulerView(
startValue: Int,
endValue: Int,
step: Int
) {
val density = LocalDensity.current
val scrollState = rememberScrollState()
val sectionWidth = 80.dp
var sliderValue by remember { mutableFloatStateOf(0.5f) }
@miguelmota
miguelmota / README.md
Last active May 15, 2024 07:48
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@slobdell
slobdell / auto_mount_usb.py
Created November 11, 2017 23:31
Automatically mount USB drive in python script
import commands
# ASSUMED THAT THIS COMMAND HAS ALREADY BEEN RUN
# sudo mkdir /mnt/usb_stick
MOUNT_DIR = "/mnt/usb_stick"
def run_command(command):
# start = time.time()
ret_code, output = commands.getstatusoutput(command)
@bramreth
bramreth / Player.gd
Created July 24, 2023 23:52
How to make a 3D Platfomer in Godot 4: Setup, Movement, and Camera Controls - code dump
extends RigidBody3D
var mouse_sensitivity := 0.001
var twist_input := 0.0
var pitch_input := 0.0
@onready var twist_pivot := $TwistPivot
@onready var pitch_pivot := $TwistPivot/PitchPivot
func _ready() -> void:
@GitBubble
GitBubble / Using FMEA to Improve Software Reliability.md
Last active May 15, 2024 07:46
使用FMEA提高软件可靠性.md

失效模式和影响分析(FMEA)是硬件设计普遍采用的一种分析方法,用来避免设计遗漏(field failure)。使用FMEA为软件系统建模来提高可靠性的工程人员逐年增加。

在诸多的方法、工具和实践中,FMEA毫无争议是开销最小,容易上手并最为有效的。(我们需要学习的原因)

FMEA的核心元素有两块:FBD(Function Block Diagram,功能块图 ) 以及 FMEA工作表

FMEA工作表是整个分析流程的最后交付件,所有分析按照推荐动作优先级在此汇总。

FMEA分析的目的是为了找到潜在的失效点。当FMEA识别到单点失效模式,我们必须有一个可靠的解决方案来应对潜在失效点。

@0x20c
0x20c / Attribute.html
Last active May 15, 2024 07:45
[Xss 触发标签及属性]
<!-- onerror -->
<img src=1 onerror=alert("xss")/>
<!-- onfocus -->
<input onfocus="alert('xss')"/>
<!-- onload -->
<svg onload=alert("xss")/>
<!-- onmouseover -->