Skip to content

Instantly share code, notes, and snippets.

View lirundong's full-sized avatar
๐ŸŒ”
Shoot the moon.

Rundong Li lirundong

๐ŸŒ”
Shoot the moon.
  • NVIDIA
  • Shanghai, China
View GitHub Profile
@jftuga
jftuga / Getting Shift+Enter to Work in Claude Code with iTerm2 and tmux.md
Last active April 4, 2026 11:45
Getting Shift+Enter to Work in Claude Code with iTerm2 and tmux

Getting Shift+Enter to Work in Claude Code with iTerm2 and tmux

Shift+Enter in Claude Code inserts a newline without submitting your promptโ€”essential for writing multi-line code or complex queries. However, getting this key combination to work reliably through a terminal stack involving iTerm2 and tmux requires configuration at multiple layers.

This guide explains both the fix and the reasoning behind it.

Quick Start

If you just want it working, here's what you need:

@xuzhenglun
xuzhenglun / unlock.sh
Created February 22, 2024 15:50
bypass netflix DNS pin
#!/usr/bin/env bash
ipset -N netflix hash:net
ipset -A netflix 23.246.0.0/18
ipset -A netflix 37.77.184.0/21
ipset -A netflix 45.57.0.0/17
ipset -A netflix 64.120.128.0/17
ipset -A netflix 66.197.128.0/17
ipset -A netflix 108.175.32.0/20
{
"background" : "#1d2021",
"black" : "#665C54",
"blue" : "#7DAEA3",
"brightBlack" : "#928374",
"brightBlue" : "#7DAEA3",
"brightCyan" : "#89B482",
"brightGreen" : "#A9B665",
"brightPurple" : "#D3869B",
"brightRed" : "#EA6962",
@mbinna
mbinna / effective_modern_cmake.md
Last active April 2, 2026 07:57
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVMโ€™s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropertโ€™s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than โ€œold schoolโ€ CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active March 23, 2026 06:55
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@mbreese
mbreese / docker-heredoc-snippet
Last active July 9, 2025 05:06
Running docker with a HEREDOC to script the commands to run inside the container.
docker run -v /Users/mbreese/tmp:/tmp1 -w /tmp1 -i centos:7 /bin/bash -s <<EOF
date > foo
echo 'foo' >> foo
cat /etc/redhat-release >> foo
whoami >> foo
EOF
@tnarihi
tnarihi / upsampling-with-deconv-layer.ipynb
Last active March 19, 2019 16:11
Upsampling with DeconvolutionLayer in Caffe. Open as a notebook here: http://nbviewer.ipython.org/gist/tnarihi/54744612d35776f53278
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxwelleite
maxwelleite / ttf-vista-fonts-installer.sh
Last active February 8, 2025 02:13
Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoftโ€™s ClearType fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoftโ€™s ClearType fonts on Ubuntu distros
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007.
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas.
# Calibri became the default font on Microsoft Word 2007, and itโ€™s still the default font on Word 2016 today.
# Dependencies: wget, fontforge and cabextract
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
@rxaviers
rxaviers / gist:7360908
Last active April 5, 2026 09:12
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active April 1, 2026 19:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
mkdir -p ~/.ssh
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs