Skip to content

Instantly share code, notes, and snippets.

@499978920
499978920 / markdown flow.md
Created July 29, 2020 07:55
[markdown 画流程图] #md #流程图
start=>start: 定时任务
log=>operation: 记录请求日志
log2=>operation: 记录响应日志
query=>operation: 查询待推送数据
map=>operation: 转换为 API 请求对象
push=>operation: 请求 API
cond=>condition: 是否返回成功
state=>end: 修改状态
next=>end: 等待下一次定时任务
@499978920
499978920 / json sort.js
Created July 3, 2020 07:42
[JSON 数组排序] json 数组日期排序 #json
function sortDate(a,b){
return new Date(a)-new Date(b);
}
items.sort(sortDate).map(function(a,b){return a.time})
@499978920
499978920 / 修改字段说明.sql
Last active July 2, 2020 02:37
[添加数据库字段属性]数据库字段属性说明修改 #db
-- ALTER TABLE MD_CustomerGroupSheet ADD IsPushed BIT
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('MD_CustomerGroupSheet')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IsPushed')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'MD_CustomerGroupSheet', 'column', 'IsPushed'
end
@499978920
499978920 / profile.ps1
Created June 30, 2020 06:04
[powershell proxy] power shell 走代理 #powershell #proxy
# path
# C:\Program Files\PowerShell\7
function set_proxy_variable {
$proxy = 'http://127.0.0.1:10809'
# temporary
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy