Fork me on GitHub

HP Culture

HP Culture

Will to Win

  • 充满活力,振奋精神,以每天成功的意愿
  • Be the best you can be
  • Reaching your highest human potential.
Continue reading →

Chatops With Slack

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

Continue reading →

Switch Company Home Network Smoothly

随心切换于公司网络和家庭网络

问题

在家里连公司VPN后,虽然可以访问到内网的一些Server资源和网站,但是当我访问一些国内网站的时候,因为代理的原因,绕了一圈,导致页面加载缓慢,更有甚者,比如网易云音乐,更是对国外代理进行了屏蔽,导致无法连公司网络的同时,在线收听音乐。

解决办法

连接公司VPN后,使用 IE 浏览器或者Chrome 浏览器访问公司内网和国外资源。

IE And Chrome Proxy

在家里的一台24小时开机机器上安装CCProxy 软件,然后在本机上使用FireFox 通过这台Home machine 作为国内网站的Proxy。

FireFox CCProxy

Continue reading →

Visual Studio Guide

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

edit-breakpoint-label

After adding labels to breakpoints, you can view them in the Breakpoints window:

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

  • Incremental Search Ctrl + I

  • Find All Reference Shift + F12

  • Full Screen Shift+Alt+Enter

  • Go To Implementation Ctrl + F12

Visual Studio 2017 Extensions

Python Development with Visual Studio 2017

Visual Studio 2019

Visual Studio 2019 Extensions

  • Whack Whack Terminal

Terminal emulator for Visual Studio. Allows you to run command prompt, powershell, WSL bash. All including interactive mode.

Continue reading →

All Tags

mindset

devops

book

ci

communication

jenkins

自媒体

hometown

geek life

cloud

ai