Skip to content

Instantly share code, notes, and snippets.

View miclle's full-sized avatar
👹
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�

Miclle Zheng miclle

👹
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
View GitHub Profile
@miclle
miclle / css-chronograph.markdown
Created January 8, 2023 15:24
CSS Chronograph
-- 重新加载配置
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", function()
hs.reload()
end)
hs.alert.show("加载完毕")
-- 窗口横二竖二
hs.hotkey.bind({"cmd", "ctrl"}, "a", function()
local win = hs.window.focusedWindow()
// params struct 调整为 common 包的alias
type (\w+) struct \{\n([,/|\[\]\s\w\*\(\)\?`:".-]+)\n\}
type $1 = common.$1
// params string 调整为 common 包的alias
type (\w+) string
type $1 = common.$1
// params int 调整为 common 包的alias
type (\w+) int
package application
import (
"net/http"
"github.com/gin-gonic/gin"
)
// Engine for server
type Engine struct {
@miclle
miclle / timestamp.go
Created July 9, 2020 02:55
golang timestamp type
package timestamp
import (
"database/sql/driver"
"fmt"
"strings"
"time"
"github.com/araddon/dateparse"
"github.com/globalsign/mgo/bson"

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email your@email.com will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default in main.go, so you can run gogitlocalstats without parameters.

Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.

License: CC BY-SA 4.0

//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person