Skip to content

Instantly share code, notes, and snippets.

:octocat:

Elon Tang blackcater

:octocat:
Block or report user

Report or block blackcater

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blackcater
blackcater / minikube-start.txt
Created Aug 22, 2019
minikube for chinese people.
View minikube-start.txt
minikube start --image-mirror-country="cn" --registry-mirror="http://f1361db2.m.daocloud.io"
View Mojave Theme Colors.scss
// When color definition differs for dark and light variant,
// it gets @if ed depending on $variant
// Base colors
$base_color: if($variant =='light', #ffffff, #242424);
$text_color: if($variant == 'light', #363636, #dadada);
$bg_color: if($variant =='light', #f5f5f5, #333333);
$fg_color: if($variant =='light', #242424, #dedede);
$alt_fg_color: if($variant=='light', #383838, #3d3d3d);
View main.css
// constant(safe-area-inset-top):在Viewport顶部的安全区域内设置量(CSS像素)
// constant(safe-area-inset-bottom):在Viewport底部的安全区域内设置量(CSS像素)
// constant(safe-area-inset-left):在Viewport左边的安全区域内设置量(CSS像素)
// constant(safe-area-inset-right):在Viewport右边的安全区域内设置量(CSS像素)
// constant 为 iOS 11 推荐,于 iOS 11.2 后更改为 env
// top, bottom, left, right 指你当前手机朝向的上下左右
@blackcater
blackcater / sdk.fish
Last active Sep 6, 2018
sdkman support fishshell
View sdk.fish
# sdk command
function sdk
bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk $argv"
end
# add paths
for ITEM in $HOME/.sdkman/candidates/* ;
set -gx PATH $PATH $ITEM/current/bin
end
@blackcater
blackcater / diagrams.md
Created Jul 6, 2018
Markdown Diagrams
View diagrams.md

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@blackcater
blackcater / h5.md
Last active Jul 11, 2019
H5项目常见问题汇总及解决方案
View h5.md

Meta基础知识:

H5页面窗口自动调整到设备宽度,并禁止用户缩放页面 //一、HTML页面结构 // width 设置viewport宽度,为一个正整数,或字符串‘device-width’ // height 设置viewport高度,一般设置了宽度,会自动解析出高度,可以不用设置 // initial-scale 默认缩放比例,为一个数字,可以带小数 // minimum-scale 允许用户最小缩放比例,为一个数字,可以带小数 // maximum-scale 允许用户最大缩放比例,为一个数字,可以带小数

View normalize.css
html {
scroll-behavior: smooth;
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
scroll-behavior: smooth;
margin: 0;
}
@blackcater
blackcater / rem.js
Created Nov 30, 2016 — forked from xiaojue/rem.js
rem.js
View rem.js
/*
* rem.js
* v0.1.1
* fixed 2015-3-12
*/
(function (win){
var doc = win.document,
html = doc.documentElement,
option = html.getAttribute('data-use-rem');
@blackcater
blackcater / common.scss
Last active Dec 13, 2016 — forked from xiaojue/common.css
common.scss
View common.scss
@charset 'UTF-8';
// css reset
html,
body,
div,
span,
applet,
object,
iframe,
View emoji.js
function filterEmoji(str) {
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "")
}
You can’t perform that action at this time.