Skip to content

Instantly share code, notes, and snippets.

View RenovZ's full-sized avatar

RenovZ

View GitHub Profile
@xtrasmal
xtrasmal / create_icns.sh
Last active December 8, 2025 20:19
Create a .icns file and/or png placeholders. Uses imagick to create the placeholders.
#!/bin/bash
# Icons and names
ICONS=(
"icon_16x16.png:16x16"
"icon_16x16@2x.png:32x32"
"icon_32x32.png:32x32"
"icon_32x32@2x.png:64x64"
"icon_128x128.png:128x128"
"icon_128x128@2x.png:256x256"
@cloudwu
cloudwu / clog.c
Created February 5, 2024 04:49
concurrence log
#include "clog.h"
#include <stdatomic.h>
#include <stdlib.h>
#include <string.h>
#define LOGMETA_BUFFER 4096
#define LOGDATA_BUFFER (64 * 1024)
// [..........................]
// ^
@padeoe
padeoe / README_hfd.md
Last active July 10, 2026 04:26
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Note

(2026-06-18) Add 📊Download Progress, 🔁integrity-aware resume (re-fetch missing or changed files), and fast, resumable listing for 📚repos with massive file counts.
(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.

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 leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

@rbreaves
rbreaves / USBkbd-linux2mac.sh
Created December 12, 2021 06:47
Remap USB keyboards on Linux to be like an Apple Keyboard - swaps Alt/Win(Super)
sudo apt install evtest
sudo evtest
----------------------------------- No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Video Bus
/dev/input/event2: gpio-keys
/dev/input/event3: gpio-keys
/dev/input/event4: HDA Intel PCH Mic
- id: 'port-forward'
name: 'gcr.io/cloud-builders/docker'
args: [
'run',
'-itd',
'--network-alias', 'ml-pipeline.local',
'-e', 'CLOUDSDK_COMPUTE_ZONE=${_KF_ZONE}',
'-e', 'CLOUDSDK_CONTAINER_CLUSTER=${_KF_CLUSTER}',
'-e', 'CLOUDSDK_CORE_PROJECT=${_KF_PROJECT}',
'-p', '8888:8888',
@mkfares
mkfares / zsh-keyboard-shortucts.md
Last active April 30, 2026 16:15
Common zsh Keyboard Shortcuts on macOS Catalina

Common zsh Keyboard Shortcuts on macOS

Navigation

CTRL + A : Move the cursor to the beginning of the line
CTRL + E : Move the cursor to the end of the line
OPTION + Left Arrow : Move the cursor one word backward
OPTION + Right arrow : Move the cursor one word forward
Left Arrow : Move the cursor one character backward
Right Arrow : Move the cursor one character forward

@nmarley
nmarley / README.md
Last active April 27, 2026 02:25
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 3, 2026 13:25
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@mikesmullin
mikesmullin / trace.js
Created November 24, 2017 23:21
Node.JS print filename and line number prefixed to console log output
const path = require('path');
function trace(s) {
const orig = Error.prepareStackTrace;
Error.prepareStackTrace = (_, stack) => stack;
const err = new Error();
Error.captureStackTrace(err, arguments.callee);
Error.prepareStackTrace = orig;
const callee = err.stack[0];
process.stdout.write(`${path.relative(process.cwd(), callee.getFileName())}:${callee.getLineNumber()}: ${s}\n`);