Skip to content

Instantly share code, notes, and snippets.

@liuran001
liuran001 / config.yaml
Last active November 22, 2025 19:45
mihomo (Clash Meta) 懒人配置
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. 倾城极速 邀请码: 0jiB5uAA https://qcjs.ovh/#/register?code=0jiB5uAA
# 2. ssLinks 邀请码: fSo2OhzH https://98a6251b6cd7471da86cca993b6dbe6f.36d.biz/#/register?code=fSo2OhzH
# 一定要填我的邀请码,不填我哭给你看😭
# mihomo (Clash Meta) 懒人配置
# 版本 V1.22-250718
@ongkiii
ongkiii / IPA-Sources.md
Last active November 22, 2025 19:30
REPOS/TELEGRAM CHANNELS LIST BY u/angkitbharadwaj
@nngogol
nngogol / pdf_russian_reportlab.py
Created March 21, 2018 14:08
How to write russian text in reportlab in python. Also, download 'DejaVuSerif.ttf' from internet.
#!/usr/bin/env python
#-*- coding: UTF-8 -*-
from reportlab.lib import colors
from reportlab.platypus import Paragraph, SimpleDocTemplate, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.pagesizes import A4
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
@CMCDragonkai
CMCDragonkai / makeWrapper_and_wrapProgram.md
Created August 24, 2018 07:50
makeWrapper and wrapProgram #nix

makeWrapper and wrapProgram

Nix generally assumes run-time dependencies is a subset of the build-time dependencies.

This means many Nix builder functions try to automatically scan the output for runtime dependencies and "rewrite" them for runtime usage.

However shell scripts which are often exported by packages do not get this automatic scanning treatment.

This means you have to use the makeWrapper package and use either the makeWrapper or wrapProgram utility functions.

@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active November 22, 2025 19:22
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

<?php
// This code is what the Symfony Dependency Injection container performs
// under the hood when registering a listener.
$eventDispatcher->addListener(
KernelEvents::REQUEST,
function ($event) {
// only when here, MyListener and ExpensiveDependency trigger autoloading
// and the time of calling their constructor is spent.
(new MyListener(new ExpensiveDependency))->onKernelRequest($event);
},
@ikbelkirasan
ikbelkirasan / writing-a-state-of-the-art-section.md
Created November 1, 2018 19:28
Writing the "Related Work" Section of a Paper/thesis

Writing the "Related Work" Section of a Paper/thesis

By: Chamin Morikawa (https://www.linkedin.com/pulse/writing-related-work-section-paperthesis-chamin-morikawa/)

For most students, writing about what they did on their own is not hard. But writing about others' work - which is what you have to do in the "State of the Art" or "Related Work" section - is quite hard for them. Here are a few guidelines to make this task a bit easier.

The Basics

Let's lay down our assumptions before continuing. I assume that you want to write a "Related Work" section for a research paper or a thesis that describes your approach to solve some problem. Let's also assume that there are other publications that attempt to solve the same problem, but the solutions in them are not perfect. Finally, let's assume that your approach has some difference when compared to those by others, and some improvement (faster, more accurate, easier to afford, etc.).

@krazyjakee
krazyjakee / DownloadMixamoByJakeCattrall.js
Last active November 22, 2025 19:20 — forked from LouisGameDev/DownloadMixamoByLouisHong.js
Downloads all the free Mixamo Animations
function trigger(el, eventType) {
if (typeof eventType === 'string' && typeof el[eventType] === 'function') {
el[eventType]();
} else {
const event =
eventType === 'string'
? new Event(eventType, {bubbles: true})
: eventType;
el.dispatchEvent(event);
}
@sjvnnings
sjvnnings / better_jumping_character_example.gd
Last active November 22, 2025 19:18
An easy to work with jump in Godot
extends KinematicBody2D
export var move_speed = 200.0
var velocity := Vector2.ZERO
export var jump_height : float
export var jump_time_to_peak : float
export var jump_time_to_descent : float
@jboner
jboner / latency.txt
Last active November 22, 2025 19:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD