Skip to content

Instantly share code, notes, and snippets.

View jasonzhouu's full-sized avatar

Jason Zhou jasonzhouu

View GitHub Profile
@jasonzhouu
jasonzhouu / tips.md
Last active March 11, 2020 09:52
提示框
@jasonzhouu
jasonzhouu / 小三角形.md
Last active March 11, 2020 08:52
用border创建小三角形

image

原理:

  • 创建一个width, height都为0,从而border共同构成一个正方形;
  • 将border的颜色设置为transparent,存在但是看不到;
  • 设置top border的颜色,使其存在且可以看到,它与相邻侧的border的边界是45°斜角,表现为三角形。

image

@jasonzhouu
jasonzhouu / index.html
Last active March 11, 2020 05:21
inline, block, inline-block的尺寸设置的区别
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>1</div>

用flexbox实现圣杯布局,代码很直观,进行2次flex排列:

  • 上中下:flex-direction=column
    • 中间部分 flex-grow=1,占据所有剩余空间
    • 上下部分 flex-grow=0(默认值,可以不设置)
  • 左中右:flex-direction=row(默认值)
    • 左边栏order=-1(负一),排在最左边
    • 左右边栏基准尺寸 flex-basis=100px,flex-grow=0(默认值)
    • 中间部分flex-grow=1,占据所有剩余空间
@jasonzhouu
jasonzhouu / launch.json
Created January 27, 2020 04:15
vscode config
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
@jasonzhouu
jasonzhouu / oh-my-zsh-agnoster-light-theme.md
Last active April 4, 2024 15:20
zsh agnoster light theme
  1. save agnoster-light.zsh-theme to ~/.oh-my-zsh/themes/.
  2. edit ZSH_THEME in ~/.zshrc to agnoster-light
  3. change the color theme of terminal to solarized-light
  4. open a new terminal
@jasonzhouu
jasonzhouu / chinese_input_in_manjaro.md
Last active May 23, 2024 01:45
Config Chinese input method in Manjaro(Manjaro 配置中文输入法)

1. install packages

run:

yay -Syu adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts 
yay -Syu fcitx fcitx-googlepinyin fcitx-im fcitx-configtool 

2. config environmental variables

sudo vim /etc/profile
@jasonzhouu
jasonzhouu / proxychains.conf
Last active November 12, 2019 05:50
proxy git clone
# proxychains.conf VER 3.1
#
# HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS.
#
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
#dynamic_chain
@jasonzhouu
jasonzhouu / .conkyrc
Last active November 14, 2019 15:05
config conky to show time and hardware information on desktop
background yes
Window
own_window_argb_visual yes
own_window_type default
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager