Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active January 17, 2025 02:48
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@brasoratnilo464
brasoratnilo464 / Quick Surface License Key
Created October 30, 2024 14:26
Quick Surface Crack
Quick Surface Keygen
@pcgeek86
pcgeek86 / cheatsheet.ps1
Last active January 17, 2025 02:33
PowerShell Cheat Sheet / Quick Reference
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
@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] = {
@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active January 17, 2025 02:28
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@codedokode
codedokode / !Как установить сфинкс.md
Last active January 17, 2025 02:23
Как установить и настроить сфинкс.

Как установить и настроить сфинкс.

Скачиваем сфинкс (берем версию с MySQL и со стеммингом на 15 языков Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support соответствующую битности твоей ОС), распаковываем например в d:\temp\s\

На этом установка sphinx завершена. В дебиане просто делаем sudo apt-get install sphinxsearch.

Создаем таблицы:

CREATE TABLE news 

(id INT(10) AUTO_INCREMENT PRIMARY KEY, topic INT(10) NOT NULL, header VARCHAR(200) NOT NULL,

@jdmichaud
jdmichaud / 1-zig-cheatsheet
Last active January 17, 2025 02:17
Zig cheatsheet
https://ziglang.org/documentation/master/#Pointers
*T - single-item pointer to exactly one item.
Supports deref syntax: ptr.*
[*]T - pointer to unknown number of items. (eq. of *T in C)
Supports index syntax: ptr[i]
Supports slice syntax: ptr[start..end]
Supports pointer arithmetic: ptr + x, ptr - x
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active January 17, 2025 02:17
set -e, -u, -o, -x pipefail explanation
@evantoli
evantoli / GitConfigHttpProxy.md
Last active January 17, 2025 02:15
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@FuzzysTodd
FuzzysTodd / 0xSplits(copy)...artifacts...build-info...b02e0ebd369ca1a103d64cc6915a172f.json
Created September 7, 2024 07:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=10.0.2.15&optimize=true&runs=5000000&gist=
This file has been truncated, but you can view the full file.
{
"id": "b02e0ebd369ca1a103d64cc6915a172f",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"0xSplits(copy)//SplitMain.sol": {