Skip to content

Instantly share code, notes, and snippets.

@tdkr
tdkr / 如何将iconfont融入vuetify.md
Created May 23, 2024 03:46 — forked from lesonky/如何将iconfont融入vuetify.md
如何将 iconfont 融入 vuetify #iconfont #vuetify

前言: vuetify 为我们提供了很多 iconfont 选择,并且提供了一个 VIcon 的组件,使用还是比较方便的,但是随着需求的不断迭代,公版的 iconfont 已经不足以满足我们的需求,我们需要一个自己定制一些 icon,那么问题就来了,如果让自定义的icon和原有的 VIcon 组件结合呢,毕竟提供两种 icon 组件会在使用的时候感到困惑.

解决问题:

根据 [vuetify 的文档][1],我们找到最后一段

// Instead of provided icon fonts presets you can use your own component icons. You also can switch icons that are used in Vuetify component with your own.
@tdkr
tdkr / docker-registry-mirrors.md
Created April 16, 2024 12:11 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@tdkr
tdkr / LocalNetworkAuthorization.swift
Created March 31, 2023 07:00 — forked from doozMen/LocalNetworkAuthorization.swift
Uses bonjour networking to relialby check if user has granted local network access with async await as of iOS14
import Foundation
import Network
/// Uses bonjour networking to relialby check if user has granted local network access
/// How to use:
/// Add LocalNetworkAuthorization class to your project
/// Open .plist file and add "_bonjour._tcp", "_lnp._tcp.", as a values under "Bonjour services"
/// Call requestAuthorization() to trigger the prompt or get the authorization status if it already been approved/denied
/// about the author: https://stackoverflow.com/a/67758105/705761
@tdkr
tdkr / mongodb_cheat_sheet.md
Created February 28, 2023 10:03 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

var (
MaxWorker = os.Getenv("MAX_WORKERS")
MaxQueue = os.Getenv("MAX_QUEUE")
)
// Job represents the job to be run
type Job struct {
Payload Payload
}
@tdkr
tdkr / content.md
Created September 12, 2019 06:29 — forked from baymaxium/content.md
Splunk和ElasticSearch深度对比解析

原文:运维帮

随着Splunk越来越被大家熟知和认可,现在市面上也不断涌各种同类产品,作为大数据搜索界的翘楚Splunk和ElasticSearch,绝对值得我们去学习,探索和使用,因此为了造福Splunk的铁粉和新粉们,小编特邀了Splunk的资深架构师,江湖人称“陶指导”的陶刚为大家就架构,功能,产品线,概念等方面将Splunk和ElasticSearch做了一下全方位的对比,希望能够给大家在制定大数据搜索方案的时候有所帮助。

陶刚在Splunk上海担任资深架构师,负责数据采集和云平台产品的技术架构。 拥有丰富的企业级产品的开发经验,对数据科学,数据可视化和机器学习等领域有着浓厚的兴趣。同时是足球和炉石传说的狂热爱好者,也是大圣庞卡足球队的当家球霸和炉石传说俱乐部最受追捧的明星会长。

本文就架构,功能,产品线,概念等方面就ElasticSearch和Splunk做了一下全方位的对比,希望能够大家在制定大数据搜索方案的时候有所帮助。

@tdkr
tdkr / TableToXML.lua
Created May 23, 2018 02:05
Convert Lua Table to XML
--(c)2015 Leandro T. Fonseca
local Str = ""
local function TableToXML_(Tab, Key2, Depth, Attributes2)
for Key, Value in Pairs(Tab) do
if Type(Key) == "string" and Type(Value) == "table" then
if Key ~= "_attr" then
if Value[1] then
local Attributes = ""
@tdkr
tdkr / Lua.sublime-syntax
Last active December 21, 2018 02:52
add lua symbol matches of some function definations to ST3
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Lua
comment: "Lua Syntax: version 0.8"
file_extensions:
- lua
scope: source.lua
contexts:
main: