Skip to content

Instantly share code, notes, and snippets.

View teefan's full-sized avatar
🏠
Working from home

Long Tran teefan

🏠
Working from home
  • Teefan Team
  • Sai Gon
  • 18:33 (UTC +07:00)
View GitHub Profile
@teefan
teefan / Nguyên tắc đánh cầu lông.md
Created March 30, 2026 11:28
Bộ "bí kíp" thực chiến tóm tắt các nguyên tắc cốt lõi trong đánh cầu lông

Các nguyên tắc cốt lõi trong đánh cầu lông:

Phán đoán quỹ đạo và hướng đi:

  • Khi đối thủ với cầu/chậm nhịp: Chuẩn bị đón đường cầu đi thẳng góc với vai của đối thủ hoặc tản trệch ra ngoài cơ thể.
  • Khi đối thủ chuẩn bị chạm cầu: Nhìn thẳng vào góc nghiêng của mặt vợt ở đúng tích tắc chạm, mặt vợt nghiêng hướng nào thì cầu bay hướng đó.
  • Khi đối thủ xoay vai, kéo vung tay sâu về sau: Lùi trọng tâm, chuẩn bị tư thế phòng thủ một cú đập mạnh.
  • Khi đối thủ vung tay ngắn, dừng đột ngột hoặc ghìm cổ tay: Lao lên lưới ngay lập tức để bắt quả bỏ nhỏ hoặc cắt cầu.
  • Khi cầu bay bổng sâu về cuối sân (cảm giác sắp ra ngoài): Vẫn phải lùi theo sát cầu, vì lực cản không khí sẽ làm cầu giảm tốc đột ngột và rơi thẳng đứng xuống sát vạch.

Xác định vị trí và bộ pháp di chuyển:

@teefan
teefan / microgpt.py
Created February 15, 2026 01:30 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.bash_profile: executed by bash(1) for login shells.
# The copy in your home directory (~/.bash_profile) is yours, please
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.bashrc: executed by bash(1) for interactive shells.
# The copy in your home directory (~/.bashrc) is yours, please
@teefan
teefan / ffmpeg.md
Last active March 15, 2025 08:29 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Add -hwaccel auto for auto hardware acceleration.

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

@teefan
teefan / build.bat
Last active October 26, 2023 03:58
Simple Godot build script for Windows
@echo off
set godot_dir=C:\godot
set doc_dir=C:\godot-docs
set demo_dir=C:\godot-demos
set copy_editor_dir=C:\Users\Teefan\Desktop\Godot\Editors
set export_templates_dir=C:\Users\Teefan\AppData\Roaming\Godot\export_templates
git fetch
@teefan
teefan / .bashrc
Created March 8, 2023 08:18 — forked from marioBonales/.bashrc
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@teefan
teefan / .bash_profile
Last active March 5, 2023 03:06
Fix Cygwin Ruby missing command alias
export RUBY_BIN="/cygdrive/c/Ruby32-x64/bin"
for file in $RUBY_BIN/*.bat; do
base=$(basename -- "$file")
cmd="${base%.*}"
alias $cmd="$file"
done
@teefan
teefan / .gitattributes
Last active July 27, 2024 09:03
Unity Git LFS .gitattributes
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@teefan
teefan / gist:927b13d51801b2544e8f6ac1c6cf087b
Created July 19, 2022 14:33
Install Ruby on MacOSX SSL workaround flag
OPENSSL_CFLAGS=-Wno-error=implicit-function-declaration