Skip to content

Instantly share code, notes, and snippets.

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

tataue

❣️
滴水穿石
View GitHub Profile
@tataue
tataue / adhoc
Created May 12, 2013 04:58 — forked from anonymous/adhoc
#!/bin/bash
#####################################
#Author: Leon Lee #
#email: [email protected] #
#QQ: 730395591 #
#Version: 1.0 #
#Note: If you have some good ideas #
# or advice, please mail me^^ #
#####################################
@tataue
tataue / 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;
@tataue
tataue / uploader.yml
Last active April 22, 2022 14:03
uploader [nginx+php]
version: '3'
services:
uploader:
image: zyfyy/php-fpm
container_name: php-fpm
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: php-fpm
SERVICE_TAGS: dev
@tataue
tataue / 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" };
@tataue
tataue / 同步.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
@tataue
tataue / rsync.md
Last active April 22, 2022 14:02
[command] 各类有用的命令 #curl #command

skip local file use rsync --ignore-existing-files to skip local existing files

@tataue
tataue / git.md
Created October 7, 2021 13:52
[git] git tips #git
git status --porcelain # 是否干净
@tataue
tataue / 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

方法三:

@tataue
tataue / 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.

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

extends条件语句汇总

play链接

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

// 基本extends
/**
 * @example
 * type A1 = 1