Skip to content

Instantly share code, notes, and snippets.

View thundernet8's full-sized avatar
🎯
Focusing

✨ Touchumind thundernet8

🎯
Focusing
View GitHub Profile
@thundernet8
thundernet8 / main.go
Created May 20, 2021 10:21
stream response
package main
import (
"fmt"
"io"
"net/http"
"os"
"github.com/gin-gonic/gin"
)
@thundernet8
thundernet8 / color-palette.js
Created February 9, 2020 16:58
antd的调色板函数
(function() {
// TinyColor v1.4.1
// https://github.com/bgrins/TinyColor
// 2016-07-07, Brian Grinstead, MIT License
var trimLeft = /^\s+/,
trimRight = /\s+$/,
tinyCounter = 0,
mathRound = Math.round,
mathMin = Math.min,
mathMax = Math.max,
@thundernet8
thundernet8 / randstr.ts
Last active December 17, 2019 03:07
获取随机字符串
export function getRandomStr(
length = 10,
type: 'all' | 'number' | 'latin' = 'all',
) {
const seedMap = {
all: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
number: '0123456789',
latin: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
};
const strs = seedMap[type] || seedMap.all;
@thundernet8
thundernet8 / cloudSettings
Last active August 21, 2019 03:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-05-17T02:21:07.889Z","extensionVersion":"v3.2.9"}
@thundernet8
thundernet8 / fonts.txt
Created May 7, 2019 13:22
vscode fonts
'Input Mono',
'Fira Code',
CamingoCode,
Consolas,
'Courier New',
monospace
@thundernet8
thundernet8 / css-interval.html
Created June 12, 2018 11:37
纯css倒计时
<!doctype>
<html>
<head>
<title>CSS 倒计时</title>
<style>
.interval-wrapper {
position: relative;
margin: 40px auto;
background: white;
@thundernet8
thundernet8 / redis-pattern-del.sh
Created December 26, 2017 06:10
Redis batch del keys matched specified pattern
redis-cli -a yourpassword KEYS "_profile_*" | xargs redis-cli -a yourpassword DEL
IS_NODE =
typeof global !== "undefined" &&
new Object().toString.call(global) === "[object global]"
@thundernet8
thundernet8 / README.md
Created October 12, 2017 16:54 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
echo $(git status -s | grep -ci "")