Skip to content

Instantly share code, notes, and snippets.

View workze's full-sized avatar
🎯
Focusing

Wangguize workze

🎯
Focusing
View GitHub Profile
@workze
workze / idea-class-template
Created June 4, 2020 15:35
idea class template
/**
*@author ${USER}
*@create ${DATE} ${TIME}
*/
@workze
workze / git-ssh-sshkey.sh
Created May 18, 2020 11:26
git ssh sshkey config
ssh-keygen -t rsa -C "[email protected]"
git config --global user.name xxx
git config --global user.email [email protected]
@workze
workze / mac-app.fav
Last active June 15, 2020 12:59
mac app software fav
chrome
dash
休息一下
iShot
cheatsheet
sublime
uTools
iHosts
滴答清单
搜狗输入法
show create table table_name;
@workze
workze / mac-图标大小.sh
Last active June 4, 2020 03:50
mac 图标大小
defaults write com.apple.dock springboard-columns -int 8
defaults write com.apple.dock springboard-rows -int 6
defaults write com.apple.dock ResetLaunchPad -bool TRUE
killall Dock
====
"font_face": "Courier New",
"font_size": 10
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@workze
workze / mysql-generate-column.sql
Created April 29, 2020 02:24
mysql generate column 生成列
create table `tt` (
`id` int(11) not null,
`first_name` varchar(20),
`last_name` varchar(20),
`full_name` varchar(40) as ( concat(first_name, ' ', last_name) )
primary key (`id`)
) engine=InnoDb DEFAULT charset=utf8mb4;
插入:1、不带full_name;2、只能带 DEFAULT
@workze
workze / mysql-cte-with.sql
Last active April 29, 2020 02:13
mysql cte with
with t1 as (select * from t_table where id = 1), t2 as (select * from t1 where id = 1)
select * from t1, t2
递归CTE
with recursive cte(n) as (
select 1
union all
select n+1 from cte where n < 5
)
@workze
workze / 设计模式-中介模式.md
Created April 24, 2020 07:23
设计模式 中介模式

https://zhuanlan.zhihu.com/p/65931795

问题:不再是单个对象业务逻辑复杂,是对象之间的交互复杂。对象之间相互引用,相互调用。而且交互的逻辑很简单。 解决:引入中介,对象通知中介,中介通知其他相关对象。

注意:使用场景只是:对象之间的交互方法很简单,但是对象之间的引用关系很复杂。