Skip to content

Instantly share code, notes, and snippets.

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

Miclle Zheng miclle

👹
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
View GitHub Profile
-- 重新加载配置
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()
@foreversmart
foreversmart / 正则替换 type 为 某 package 下的 alias
Last active August 11, 2020 03:17
正则替换 type 为 某 package 下的 alias
// 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
@oliveratgithub
oliveratgithub / emojis.json
Last active November 14, 2024 11:47
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email [email protected] 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

@drewwells
drewwells / mingwget.sh
Last active September 29, 2020 23:22
Cross compile windows on OS X with mingw
#!/bin/sh
# check_error my_cmd --param ...
check_error() {
$* # we execute everything
if [ $? -ne 0 ]; then
echo "check_error(): erreur avec la commande suivante:"
echo "check_error(): $*"
echo "check_error(): Continuer? o/n"
read a
@bsphere
bsphere / timestamp.go
Last active January 23, 2024 02:50
UNIX timestamps in Golang
package timestamp
import (
"fmt"
"labix.org/v2/mgo/bson"
"strconv"
"time"
)
type Timestamp time.Time
@altras
altras / zshrc
Created November 30, 2013 17:13
My zshrc config :)
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="wedisagree"
# Example aliases
@kennyz
kennyz / kongwu_pi_tips.md
Last active December 25, 2021 12:41
kongwu pi tips

折腾Pi,解决疑难杂症最好还是去官网论坛

image http://www.raspberrypi.org/phpBB3/

支持Apple TimeMachine,实现Mac备份

在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)

安装nettalk

@mimosz
mimosz / nginx.conf
Created August 31, 2012 01:59
nginx + unicorn + padrino on ubuntu
# sudo ln -s ~/nginx.conf unicorn.conf
upstream app_server {
server unix:/tmp/unicorn_padrino.sock fail_timeout=0;
}
server {
listen 80;
charset utf-8;
server_name db.innshine.com;
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//