Skip to content

Instantly share code, notes, and snippets.

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

Long Tran teefan

🏠
Working from home
View GitHub Profile
# 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 June 8, 2024 08:14 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

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

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@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 March 31, 2024 08:42
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
@teefan
teefan / Keychron Linux Function Key
Created May 8, 2022 10:14
Make Keychron Linux Function keys work
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
git config --global alias.co checkout
git config --global alias.cob 'checkout -b'
git config --global alias.f fetch
git config --global alias.fp 'fetch -p'
git config --global alias.a add
git config --global alias.c commit
git config --global alias.cm 'commit -m'
git config --global alias.ca 'commit --amend'
git config --global alias.pu pull
git config --global alias.p push