Skip to content

Instantly share code, notes, and snippets.

@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active January 20, 2025 07:05
git ssh 代理设置

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@strickvl
strickvl / README.md
Last active January 20, 2025 07:04
Youtube Summarisation tampermonkey script

YouTube Video Summarizer

A Tampermonkey userscript that adds AI-powered video summarization capabilities to YouTube using GPT-4 and Claude models.

CleanShot 2025-01-19 at 17 27 06@2x

Updated recently to give better / more detailed summaries for the 'detailed summaries' button

Features

@Setsugennoao
Setsugennoao / keyframes.py
Last active January 20, 2025 07:04
Keyframe generator script
from argparse import ArgumentParser
from pathlib import Path
from vsexprtools import ExprOp, norm_expr
from vstools import (
CustomRuntimeError, Keyframes, KwargsT, Sentinel, clip_async_render, core, get_w, mod4, mod_x, ranges_product,
shift_clip, split, vs
)
name = 'SetsuNoKeyframes'
@macdja38
macdja38 / Confirm-gitlab-email.md
Created July 26, 2018 20:14
Confirm gitlab email by CLI

On your gitlab server run gitlab-rails console production

Find your user via user = User.find_by(email: "[email protected]")

Optionally change the user's email with user.email = "[email protected]" Then run user.save!

Get the user's token with user.confirmation_token

https://PutYourGitlabHere/users/confirmation?confirmation_token=PutYourTokenHere

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active January 20, 2025 07:02
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@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] = {
@mala
mala / aycabta.md
Created January 19, 2025 22:42
aycabtaあるいは糸柳茶蔵のこと

aycabtaあるいは糸柳茶蔵のこと

文章: mala

  • 2025-01-20 初稿
  • 気が向いたら、追記するかもしれない

1

@pk5ls20
pk5ls20 / re-nonebot2.md
Last active January 20, 2025 06:55
[绝赞连载中] re: 从零开始的NoneBot代码解读

re: 从零开始的NoneBot代码解读


(确信)


@robskillington
robskillington / prometheus.proto
Last active January 20, 2025 06:54
Example Python Prometheus remote write client
// Copyright 2016 Prometheus Team
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@andrewlimaza
andrewlimaza / change-set-expiration-date-programmatically.php
Created January 2, 2025 12:35
Programmatically change the Set Expiration Date from Y1 to Y2 when checkout is in October, November or December.
/**
* Adjust the Set Expiration Date Add On programmatically.
* Automatically adjust Y1-12-31 to be Y2-12-31 if the current month is October or later.
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_programmatically_change_set_expiration_date( $raw_date ) {
// No Set Expiration Date, just bail.
if ( empty( $raw_date ) ) {
return $raw_date;