Skip to content

Instantly share code, notes, and snippets.

View waitkafuka's full-sized avatar
🏸
I may be slow to respond.

zks waitkafuka

🏸
I may be slow to respond.
  • xkw
  • beijing
View GitHub Profile
@waitkafuka
waitkafuka / uv.js
Last active July 12, 2019 06:19
echarts利用uv绘制圆柱
series: [{
type: "surface",
name: "围栏模型",
parametric: true,
itemStyle: {
opacity: 1,
color: "#313695"
},
parametricEquation: {
@waitkafuka
waitkafuka / colorUtil.js
Last active December 18, 2020 02:38
颜色色值处理
/**
*
* @param {*} hex
* 把一个hex表示的色值转换为rgb表示的色值,并将r g b值以数组形式返回
*/
const hex2RgbArr = function(hex) {
let reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
hex = hex.toLowerCase();
if (hex && reg.test(hex)) {
//4位是包含井号
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@waitkafuka
waitkafuka / countdown.rb
Created December 6, 2016 07:35 — forked from gotgithub/countdown.rb
Calculate the countdown for the meeting of the party.
#!/usr/bin/ruby
# Calculate the countdown for the meeting of the party.
require 'Date'
days=(DateTime.new(2012,10,15)-DateTime.now).ceil
if days >= 0
puts "Maybe #{days} days left."
else
puts "Passed for #{days.abs} days."