Tips

  • | 1 min read

    TypeScript

    Support drag html element on mobile browser. Set touch-action: none to handler element. Remove undefined type from union type. type Foo = NonNullable<FooOrUndefined>; // { bar: number;...

    read article
  • | 1 min read

    Shell

    Find large filefind . -type f -size +100M Add tracked file to gitignoregit rm --cached <file>rm...

    read article
  • | 0 minutes read

    Life

    ...

    read article
  • | 1 min read

    GIT

    git commit --amend --no-edit -n -a && git push...

    read article
  • | 1 min read

    Flutter

    If your app include ffi code, you need to change build config before release. In Xcode, go to Target Runner > Build Settings > Strip Style. Change from All Symbols to Non-Global Symbols. Get...

    read article
  • | 1 min read

    CSS

    You can create icon sprite animations using the steps() animation-timing function button img { object-fit: cover; object-position: 0 0; }[aria-pressed=true] img { animation: play 0.5s...

    read article
  • | 1 min read

    Vue

    使用 vueuse 的 useHover 时,需要在元素中添加 @click="() => void 0",否则在 ios 中不生效 Debug 弹出组件 setTimeout(function(){ debugger }, 5000) Firefox favicon 必须使用 32x32...

    read article