Skip to content

Instantly share code, notes, and snippets.

View guotingchao's full-sized avatar
🇵🇰
⛽️

Guo ZiChun guotingchao

🇵🇰
⛽️
View GitHub Profile
@gubatron
gubatron / delete_github_workflow_run_logs.sh
Last active June 30, 2023 20:08
Batch delete 30 Github Workflow Run Logs using the github command line tool
#
# This script uses the github command line tool
# to delete the last 30 logs from your repository's workflow runs
#
# Requirements
#
# gh - github command line (brew install gh)
# you will need a GH_TOKEN, create it here: https://github.com/settings/tokens
#
# once you've created the personal access token with permission to manage your workflows
@guotingchao
guotingchao / gist:5219372
Last active December 15, 2015 06:49
mongodb的坑
//Query, Insert, Update are worked, but CPU load very high in ReplSet mode!
//Explore the cause of the problem
//ACL would blocked all unauthorized network access.
//I found out the problem, it eat the CPU by /lib/mongodb/connection/connection_pool.js.
connection.on("connect", function(err, connection) {
// Add connection to list of open connections
_self.openConnections.push(connection);
// If the number of open connections is equal to the poolSize
if(_self.openConnections.length === _self.poolSize && _self._poolState !== 'disconnected') {