Skip to content

Instantly share code, notes, and snippets.

View notnotype's full-sized avatar
📖
Studying...

Notype notnotype

📖
Studying...
View GitHub Profile
@notnotype
notnotype / snippet.md
Last active February 28, 2022 10:12
[python字符串格式化] #Python
print('aaa{0!r:.^5.3}aaa'.format('1234567'))
print('aaa{0:5.3f}aaa'.format(12.23))
# '!a' 应用 ascii() ,'!s' 应用 str(),'!r' 应用 repr()
@notnotype
notnotype / snippet.js
Created July 27, 2021 10:09
[JavaScript toHexString] #JavaScript
function toHexString(bytes) {
return bytes.map(function(byte) {
return (byte & 0xFF).toString(16)
}).join('')
}
@notnotype
notnotype / snippet.md
Created May 19, 2021 11:54
[用户代理检测] #JavaScript
@notnotype
notnotype / snippet.md
Last active April 14, 2021 02:45
[客户端滚动属性] dom元素尺寸 #JavaScript #前端
@notnotype
notnotype / snippet.md
Last active April 13, 2021 05:21
[css动画参数] css动画参数 #css

常用css动画参数

(1)贝塞尔曲线

transition: transform 1000ms cubic-bezier(0.7, 0, 0.3, 1) 0ms;

(2)阴影

box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)
@notnotype
notnotype / snippet.md
Last active April 14, 2021 02:23
[python 日期格式化] #Python
%a 星期几的简写;如 星期三为Web 
%A 星期几的全称;如 星期三为Wednesday 
%b 月份的简写; 如4月份为Apr 
%B 月份的全称; 如4月份为April 
%c 标准的日期的时间串;(如: 04/07/10 10:43:39) 
%C 年份的后两位数字 
%d 十进制表示的每月的第几天 
%D 月/天/年 
%e 在两字符域中,十进制表示的每月的第几天 
@notnotype
notnotype / snippet.md
Last active April 14, 2021 02:23
[常用正则表达式] 常用正则表达式 #regex #Python #JavaScript

常用正则表达式

匹配html tag

body
<\s*body\s*(?:\s*[^>/]+\s*)*>([\s\S]*)<\s*/\s*body\s*(?:\s*[^>/]+\s*)*>

<\s*[^>/]+\s*(?:\s*[^>/]+\s*)*>([\s\S]*)<\s*/\s*[^>/]+\s*(?:\s*[^>/]+\s*)*>