Skip to content

Instantly share code, notes, and snippets.

View SteveLauC's full-sized avatar
😃
I love code that is extremely easy to follow!

SteveLauC SteveLauC

😃
I love code that is extremely easy to follow!
  • $HOME
  • 07:18 (UTC +08:00)
View GitHub Profile
pub trait IteratorExt: Iterator + Sized {
fn our_flatten(self) -> Flatten<Self>
where
Self::Item: IntoIterator;
}
impl<T> IteratorExt for T
where
T: Iterator,
{
fn our_flatten(self) -> Flatten<Self>
#![warn(rust_2018_idioms)]
#[derive(Debug)]
pub struct StrSplit<'haystack, D> {
remainder: Option<&'haystack str>,
delimiter: D,
}
impl<'haystack, D> StrSplit<'haystack, D> {
pub fn new(haystack: &'haystack str, delimiter: D) -> Self {
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 21, 2024 22:52
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

@swordfeng
swordfeng / chn_fonts.reg
Last active July 2, 2024 14:33
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"