Skip to content

Instantly share code, notes, and snippets.

View YaoYYoung's full-sized avatar
😇
The limits of my language mean the limits of my world.

YYYoung YaoYYoung

😇
The limits of my language mean the limits of my world.
View GitHub Profile
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active November 10, 2025 04:40
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@evantoli
evantoli / GitConfigHttpProxy.md
Last active November 2, 2025 09:57
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:

How to Create Your YouTube API Credentials
https://vidible.zendesk.com/hc/en-us/articles/207036056-How-to-Create-Your-YouTube-API-Credentials
Creating your YouTube API Credentials is accomplished by performing to main stages:
Stage I - Creating a Google OAuth 2.0 Web application client.
Stage II - Creating a YouTube refresh token.
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active November 5, 2025 05:09
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active November 7, 2025 17:45
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@TheJLifeX
TheJLifeX / 00-hand-gesture-recognition.gif
Last active October 21, 2025 11:32
Simple Hand Gesture Recognition Code - Hand tracking - Mediapipe
00-hand-gesture-recognition.gif
@kepano
kepano / obsidian-web-clipper.js
Last active October 27, 2025 04:27
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@yige233
yige233 / downloadMyEBooks.js
Last active December 6, 2024 14:30
Kindle 中国 批量下载自己的电子书和个人文档
/**
* 批量下载自己已购买的电子书和个人文档
* 要求:至少有一台Kindle设备。
* 打开 https://www.amazon.cn/hz/mycd/myx/ ,然后按F12键进入Console(控制台),把代码全部复制并粘贴到控制台中,回车。
* 然后输入 download("ebook") ,下载所有的电子书
* 想下载个人文档,则是输入 download("pdoc")
* 下载时如果某个文件下载失败,可以使用刚刚运行的函数(也就是 download() 或者 download("pdoc") )重新开始下载。在网页没被关闭的情况下,程序会忽略已经下载了的文件。
* 脚本运行期间请不要关闭网页,请允许网页自动下载多个文件
* 如果网页被关闭了,但恰巧你保存了上次下载任务返回的成功下载的文件列表,
* 可以选择复制该列表中的所有文字,并将其作为 download 的第二个参数传入(如 download("ebook",["something","something else"]) ),这样程序同样会忽略已经下载了的文件。