Skip to content

Instantly share code, notes, and snippets.

View gatspy's full-sized avatar

CG.gatspy gatspy

View GitHub Profile
@renevdzee
renevdzee / DuckDB.json
Last active April 16, 2025 16:24
DuckDB Windows Terminal Profile
{
"profiles": [
{
"commandline": "%ProgramFiles%\\DuckDB\\duckdb.exe -cmd .utf8 -cmd \".prompt '\ud83e\udd86 ' '.. '\" -cmd \".print DuckDB\"",
"guid": "{a6596808-443b-47e8-92b5-afffb4256702}",
"hidden": false,
"icon": "%ProgramFiles%\\DuckDB\\DuckDB.exe,0",
"name": "DuckDB",
"showMarksOnScrollbar": true,
"autoMarkPrompts": true,
@dahaha-365
dahaha-365 / lazy_script.js
Last active September 3, 2025 05:39
Clash Verge Rev 全局扩展脚本(懒人脚本配置)
/***
* Clash Verge Rev 全局扩展脚本(懒人配置)/ Mihomo Party 覆写脚本
* URL: https://gist.github.com/dahaha-365/0b8beb613f8d1ee656fe1f21e1a07959
*/
/**
* 整个脚本的总开关,在Mihomo Party使用的话,请保持为true
* true = 启用
* false = 禁用
*/
@garg-aayush
garg-aayush / Steps_multiple_cuda_environments.md
Last active August 11, 2025 05:27
Managing multiple CUDA versions using environment modules in Ubuntu

Steps to manage multiple CUDA environments

Latest Update: May 19th, 2024

This gist contains all the steps required to:

  • Install multiple CUDA versions (e.g., CUDA 11.8 and CUDA 12.1
  • Manage multiple CUDA environments on Ubuntu using the utility called environment modules.
  • Use this approach to avoid CUDA environment conflicts.

Environment Modules is a package that provides for the dynamic modification of a user's environment via modulefiles. You can find more on it at https://modules.readthedocs.io/en/latest/

@pmbaumgartner
pmbaumgartner / cloud-init.yaml
Last active August 13, 2025 19:50
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl
@shirakaba
shirakaba / README.md
Last active July 1, 2025 08:31
GUI-based debugging of iOS/macOS Rust projects in Xcode

Here's how to get your environment set up to:

  1. Develop iOS and Android apps using Rust.
  2. Enable GUI debugging of Rust projects in Xcode.

If you just want to enable GUI debugging of macOS Rust projects in Xcode, I'm not actually sure whether you need cargo-mobile at all. But one benefit of installing it is that it automatically installs rust-xcode-plugin for you, giving you syntax highlighting of Rust sources in Xcode.

Prerequisites

cargo-mobile

@gmk57
gmk57 / CoroutineTimer.kt
Last active September 16, 2024 13:55
Coroutine-based solution for delayed and periodic work
/**
* Coroutine-based solution for delayed and periodic work. May fire once (if [interval] omitted)
* or periodically ([startDelay] defaults to [interval] in this case), replacing both
* `Observable.timer()` & `Observable.interval()` from RxJava.
*
* In contrast to RxJava, intervals are calculated since previous run completion; this is more
* convenient for potentially long work (prevents overlapping) and does not suffer from queueing
* multiple invocations in Doze mode on Android.
*
* Dispatcher is inherited from scope, may be overridden via [context] parameter.
//
// ContentView.swift
// Moon
//
// Created by Tanner W. Stokes on 8/9/20.
//
import SwiftUI
struct ContentView: View {
@LukeMathWalker
LukeMathWalker / audit.yml
Last active August 23, 2025 09:47
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active September 4, 2025 09:29
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@rnyrnyrny
rnyrnyrny / logger.go
Last active April 8, 2025 19:40
log using uber zap and lumberjack
// NOTE
// This gist was created long time ago.
// According to zap's doc, now we can use zapcore.AddSync to directly add lumberjack as a zap sync
// see https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation
// So I wrote a new gist if anyone is interested:
// https://gist.github.com/rnyrnyrny/a6dc926ae11951b753ecd66c00695397
// 下面的代码已经过时了,现在直接用zapcore.AddSync就行,参考zap文档
// thanks to: