Skip to content

Instantly share code, notes, and snippets.

View zhuoqun-chen's full-sized avatar
🚀
Let's Go!

Zhuoqun Chen (Jack) zhuoqun-chen

🚀
Let's Go!
View GitHub Profile
@wadey
wadey / iterm2.zsh
Last active June 11, 2025 12:29
Change iTerm2 tab color when using SSH
# Usage:
# source iterm2.zsh
# iTerm2 tab color commands
# https://iterm2.com/documentation-escape-codes.html
if [[ -n "$ITERM_SESSION_ID" ]]; then
tab-color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 14, 2025 02:55
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active August 8, 2025 13:46
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@matthewjberger
matthewjberger / instructions.md
Last active July 24, 2025 16:53
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 13, 2025 15:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@csukuangfj
csukuangfj / QGraphicsSceneTest.cpp
Last active April 9, 2025 10:20 — forked from benjbaron/QGraphicsSceneTest.cpp
Qt QGraphicsScene click, select, move, resize, delete QGraphicsItems
// Copyright 2017. All Rights Reserved.
// Author: [email protected] (Fangjun Kuang)
#include <QtGui>
#include <QGraphicsRectItem>
#include <QGraphicsView>
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
class CustomItem : public QGraphicsEllipseItem
#rebind C-b => C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
@urey-hiker
urey-hiker / .tmux.conf
Last active August 2, 2023 19:01
urey-hiker's tmux configuration
# remap prefix from 'C-b' to 'C-x'
#unbind C-b
#set-option -g prefix C-x
#bind-key C-x send-prefix
# split panes using | and -
bind | split-window -h
bind _ split-window -v
unbind '"'
unbind %
@kriscard
kriscard / gist:36025e0e7209ebbb4d98aab2777cc3ab
Created June 17, 2019 08:50
Example of Spaceship Prompt config
#
# Spaceship ZSH Theme
#
# Author: Denys Dovhan, denysdovhan.com
# License: MIT
# https://github.com/denysdovhan/spaceship-zsh-theme
# ------------------------------------------------------------------------------
# CONFIGURATION
# The default configuration that can be overridden in .zshrc