Skip to content

Instantly share code, notes, and snippets.

View import-yuefeng's full-sized avatar
🤠
今天你为乌干达儿童捐款了吗?

Yuefeng Zhu import-yuefeng

🤠
今天你为乌干达儿童捐款了吗?
View GitHub Profile
@import-yuefeng
import-yuefeng / string-conversion.rs
Created May 14, 2021 05:13 — forked from jimmychu0807/string-conversion.rs
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@import-yuefeng
import-yuefeng / gist:1422c0867bb23304ff54e3d325fbe2ee
Last active July 9, 2020 18:08
📊 Weekly development breakdown
We couldn’t find that file to show.
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@import-yuefeng
import-yuefeng / utf-8Encoding
Created October 1, 2018 01:33
utf-8Encoding
# encoding:utf-8
import io
import sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')
@import-yuefeng
import-yuefeng / id_rsa.pub
Last active November 14, 2018 12:15
id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXFuM/WeBCRd7kXC+eWPBizqCu/tYhOaI/vwi+5lzh3Swdx+JMTLg7BiWElCfERJJplvXq8zXbeyueZ4wEQs4YaeWFE0sxdnMOPFLYkGOQXlEkEbwJQYcyJLryhGvQc0SkZ+bYeYJB6Ucm+2OzbA3NpBBJJX09YZz0RHHYp2wgk7skBLnLuhXYA72ZLudkBl8ZAuTbxTlxKx9tnyv0mTrW8/wdGbBgbgTHyYH7Ag23HzvfNa+WZ3kA1Wd4Tu2J4K9lFZe8W89T5iTyfetwAv5zobBqopa623un/4eNLa96Nc5xydv1hHWAEEJB7o2JdNaQYYoOE1oeRDl3bSrawnuZ zhuyuefeng0@outlook.com