Skip to content

Instantly share code, notes, and snippets.

View zyfyy's full-sized avatar
❣️
滴水穿石

zyfyy

❣️
滴水穿石
View GitHub Profile
@zyfyy
zyfyy / adhoc
Created May 12, 2013 04:58 — forked from anonymous/adhoc
#!/bin/bash
#####################################
#Author: Leon Lee #
#email: lendylongli@gmail.com #
#QQ: 730395591 #
#Version: 1.0 #
#Note: If you have some good ideas #
# or advice, please mail me^^ #
#####################################
@zyfyy
zyfyy / index.html
Last active August 11, 2021 04:15
[pure css cube] https://jsbin.com/jawuron #cube
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
#default-example {
height: 300px;
width: 300px;
@zyfyy
zyfyy / type-XOR.ts
Last active August 11, 2021 09:43
[ts-xor] xor typescript #ts #typescript
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
type NameOnly = { is: "NameOnly", name: string };
type FirstAndLastName = { is: "FirstAndLastName", firstname: string; lastname: string };
type Person = XOR<NameOnly, FirstAndLastName>;
let person: Person;
person = { is: "NameOnly", name: "Foo" };
person = { is: "FirstAndLastName", firstname: "Foo", lastname: "Bar" };
@zyfyy
zyfyy / git.md
Created October 7, 2021 13:52
[git] git tips #git
git status --porcelain # 是否干净
@zyfyy
zyfyy / 同步.md
Last active October 7, 2021 13:53
[github flow] #git #gitflow

同步 forcked repo

最新功能 How to update a forked repo with git rebase merge origin remote feature:

Step 1: Add the remote (original repo that you forked) and call it “upstream”

git remote add upstream https://github.com/original-repo/goes-here.git
@zyfyy
zyfyy / method.md
Last active October 7, 2021 14:01
[node-gyp offline]#node #node-gyp

方法一:

  1. 下载对应版本headers
  2. nodedir=xxxx加入npmrc环境变量中

方法二:

node-gyp install —tarball /path/to/node-x.y.z-headers.tar.gz rebuild

方法三:

@zyfyy
zyfyy / Goyo.md
Last active October 11, 2021 03:01
[vim] vim tips and other things to remember #vim

resize on some case

The window can be resized with the usual [count]CTRL-W + >, <, +, - keys, and CTRL-W + = will resize it back to the initial size.

@zyfyy
zyfyy / extends.md
Last active October 11, 2021 08:50
[typescript要点]

extends条件语句汇总

play链接

总结 infer 在被extends判断的条件子语句中定义,返回语句中使用

// 基本extends
/**
 * @example
 * type A1 = 1
@zyfyy
zyfyy / method.md
Created October 20, 2021 06:28
[虚机测试]
wget -qO- bench.sh | bash
#或者
curl -Lso- bench.sh | bash
#或者
wget -qO- 86.re/bench.sh | bash
#或者
curl -so- 86.re/bench.sh | bash

详细见

@zyfyy
zyfyy / readme.md
Last active October 21, 2021 03:09
[pacman]#linux #arch

Pacman常用命令

Pacman是Arch Linux 的包管理器。它将一个简单的二进制包格式和易用的构建系统结合了起来。不管软件包是来自官方的 Arch 库还是用户自己创建,Pacman 都能方便得管理。

更新系统

在 Archlinux 中,使用一条命令即可对整个系统进行更新: pacman -Syu 如果你已经使用pacman -Sy将本地的包数据库与远程的仓库进行了同步,也可以只执行:pacman -Su