22 Nov 2017
ChatOps With Slack and Mattermost
Subscribe to an RSS feed URL and receive updates in Slack
- Install RSS apps/plugins in the slack
- RSS -> Edit configuration to add your favorite rss feed url.
- Then when there is a post update in the feed site, you will be noticed in slack.
Automate Task
自助问答
定时任务
https://github.com/attzonko/mmpy_bot/blob/main/mmpy_bot/plugins/example.py
Mattermost
Install Mattermost in Ubuntu WSL
sudo -u mattermost ./bin/mattermost
Jenkins Integration
通过mattermost 直接触发Jenkins的Job
CR Approve
通过restapi 来check 并 approve 对应的CR
Mattermost WebHook
GitHub Action to send PR notification to Mattermost
add a file notify.yml under .github/workflows/notify.yml
# on:
# # Triggers the workflow on push or pull request events but only for the master branch
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
# jobs:
# build:
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v1
# - name: Create the Mattermost Message for Push Event
# if: $
# run: |
# echo "{ \"username\": \"Chido\", \"text\":\"Push on [$]($) by $.See [commit list]($) \"}" > mattermost.json
# - name: Create the Mattermost Message for Pull Request Event
# if: $
# run: |
# echo "{ \"username\": \"Chido\", \"text\":\"$ pull request [$]($) by $.See [commit list]($)\n**Source** : $\n**Destination** : $ \"}" > mattermost.json
# - uses: actions/action-mattermost-notify@1.1.0
# env:
# MATTERMOST_WEBHOOK_URL: $
# MATTERMOST_CHANNEL: $
Reference
https://docs.mattermost.com/deployment/bots.html
https://forum.mattermost.org/
https://mmpy-bot.readthedocs.io/en/latest/plugins.html
19 Sep 2017
随心切换于公司网络和家庭网络
问题
在家里连公司VPN后,虽然可以访问到内网的一些Server资源和网站,但是当我访问一些国内网站的时候,因为代理的原因,绕了一圈,导致页面加载缓慢,更有甚者,比如网易云音乐,更是对国外代理进行了屏蔽,导致无法连公司网络的同时,在线收听音乐。
解决办法
连接公司VPN后,使用 IE 浏览器或者Chrome 浏览器访问公司内网和国外资源。
在家里的一台24小时开机机器上安装CCProxy 软件,然后在本机上使用FireFox
通过这台Home machine 作为国内网站的Proxy。
21 Aug 2017
New feature supported by VS2013
To improve the efficiency of the team.
-
Peek Definition(select the key you want to peek, and click Alt+F12 )
-
Peek help in MSDN (select the key you want to peek, and click Alt +F1)
-
Navigate To(Ctrl +,)
-
CodeLens (Tool->Option->Text Editor->All Languages->CodeLens)
-
Quick Launch (Ctrl+Q)
-
Debug->Performance and Diagnostics
-
Edit and Continue supported for 64bit
New feature supported by VS2017
Breakpoint Labels
Within Visual Studio, once you’ve created a breakpoint, you can add one or more
labels to it by simply right-clicking and choosing Edit Labels:
edit-breakpoint-label
After adding labels to breakpoints, you can view them in the Breakpoints window:
breakpoint window
If you present code at conferences, user groups, etc., you may find labeled
breakpoints useful during demos. You can add a label like “Demo 1” to some
breakpoints, and “Demo 2” to others. Toggle which breakpoints are enabled when
you run your application in order to demonstrate different topics.
Parallel Builds
https://www.codeproject.com/tips/1042975/tips-to-improve-visual-studio-build-performance
Shortcut Keys in VS2017
Search
Navigation
Visual Studio 2017 Extensions
Python Development with Visual Studio 2017
Visual Studio 2019
Visual Studio 2019 Extensions
Terminal emulator for Visual Studio. Allows you to run command prompt, powershell, WSL bash. All including interactive mode.
12 Aug 2017
动画电影里,一只狡猾的狐狸,头戴耳机,手扶平衡车,臂膀上套着手机,哼着小曲,漫步在城市街道上。观众嘴角流露着笑容,心里赞叹着:萌萌哒。
现实世界里,看到一位骨瘦如柴的六旬老人,戴着流氓式的墨镜,蹲坐在电瓶车上面,车篮里面老人机播放着响彻巷尾的网络歌曲。
如果这个画面没能引起我们的注意,难道就因为我们是高级动物?
我想了下,可能不是,高级动物毕竟还是动物,只是我们早已习惯于进化成神的奔赴。
仔细想想,现在的人,这种高级动物,借助工具和科技,有点半仙,半机器人的感觉。以后还不知道能不能称之为人?
10 Aug 2017
4岁的小孩子,每天读10分钟的三字经,一两个月下来,一本三字经居然从头背到尾了。让我这个成人不免惭愧。
然而真的是像科学家说的成人记忆力衰退了? 还是我们与小孩的记忆模式不同?
我胡诌了下面的说法:
小孩子的大脑,是像余量充足的硬盘,每天少量接受的一些信息,他能挑选性的存到这个硬盘里;
成人的大脑,像是繁忙的内存,每天处理着大量信息,然而多数是稍纵即逝,关机就消失,很少有最终能存到硬盘的。慢慢的也习惯了这种暂存内存,忙忙碌碌的模式。