win10管理凌乱桌面_用于管理凌乱的开源存储库的命令行技巧

win10管理凌乱桌面

Effective collaboration, especially in open source software development, starts with effective organization. To make sure that nothing gets missed, the general rule, “one issue, one pull request” is a nice rule of thumb.

有效的协作(特别是在开源软件开发中)始于有效的组织。 为确保不会遗漏任何东西,一般规则“一个问题,一个请求请求”是一个很好的经验法则。

Instead of opening an issue with a large scope like, “Fix all the broken links in the documentation,” open source projects will have more luck attracting contributors with several smaller and more manageable issues.

开源项目不会像“修复文档中所有断开的链接”这样的大问题,而是会吸引更多的贡献者,帮助他们解决一些更小,更易于管理的问题。

In the preceding example, you might scope broken links by section or by page. This allows more contributors to jump in and dedicate small windows of their time, rather than waiting for one person to take on a larger and more tedious contribution effort.

在前面的示例中,您可以按节或按页划分损坏的链接的范围。 这样一来,更多的贡献者就可以投入并奉献自己的时间,而不是等待一个人承担更大,更乏味的贡献。

Smaller scoped issues also help project maintainers see where work has been completed and where it hasn’t. This reduces the chances that some part of the issue is missed, assumed to be completed, and later leads to bugs or security vulnerabilities.

范围较小的问题还可以帮助项目维护人员查看工作已完成和未完成的地方。 这样可以减少错过问题的某些部分(假定已完成)的机会,并在以后导致错误或安全漏洞。

That’s all well and good. But what if you’ve already opened several massively-scoped issues, some PRs have already been submitted or merged, and you currently have no idea where the work started or stopped?

一切都很好。 但是,如果您已经打开了几个范围广泛的问题,已经提交或合并了一些PR,而您目前不知道工作在哪里开始或停止,该怎么办?

It’s going to take a little sorting out to get the state of your project back under control. Thankfully, there are a number of command line tools to help you scan, sort, and make sense of a messy repository. Here’s a small selection of ones I use.

需要进行一些整理以使项目状态重新得到控制。 值得庆幸的是,有许多命令行工具可帮助您扫描,排序和理解混乱的存储库。 这是我使用的一小部分。

vim交互式搜索和替换 (Interactive search-and-replace with vim)

You can open a file in Vim, then interactively search and replace with:

您可以在Vim中打开文件,然后以交互方式搜索并替换为:

:%s/\<word\>/newword/gc

The % indicates to look in all lines of the current file, s is for substitute, \<word\> matches the whole word, and the g for “global” is for every occurrence. The c at the end will let you view and confirm each change before it’s made. You can run it automatically, and much faster, without c, but you put yourself at risk of complicating things if you’ve made a pattern-matching error.

%表示在当前文件的所有行中查找, s表示替代, \<word\>匹配整个单词,而g表示“ global”,表示每次出现。 最后的c可以让您查看并确认每个更改,然后再进行更改。 您可以在没有c情况下自动且以更快的速度运行它,但是如果发生模式匹配错误,您就有使事情复杂化的风险。

The markdown-link-check node module has a great CLI buddy.

markdown-link-check节点模块具有出色的CLI伙伴 。

I use this so often I turned it into a Bash alias function. To do the same, add this to your .bashrc:

我经常使用它,因此将它变成Bash别名函数 。 为此,请将其添加到您的.bashrc

# Markdown link check in a folder, recursive
function mlc () {find $1 -name \*.md -exec markdown-link-check -p {} \;
}

Then run with mlc <filename>.

然后使用mlc <filename>运行。

列出具有或不具有git存储库的子目录以及find (List subdirectories with or without a git repository with find)

Print all subdirectories that are git repositories, or in other words, have a .git in them:

打印所有属于git存储库的子目录,或者换句话说,其中包含.git

find . -maxdepth 1 -type d -exec test -e '{}/.git' ';' -printf "is git repo: %p\n"

To print all subdirectories that are not git repositories, negate the test with !:

要打印不是git存储库的所有子目录,请使用!取消测试!

find . -maxdepth 1 -type d -exec test '!' -e '{}/.git' ';' -printf "not git repo: %p\n"

使用xargs从列表中拉出多个git存储库 (Pull multiple git repositories from a list with xargs)

I initially used this as part of automatically re-creating my laptop with Bash scripts, but it’s pretty handy when you’re working with cloud instances or Dockerfiles.

我最初将其用作使用Bash脚本自动重新创建笔记本电脑的一部分,但是当您使用云实例或Dockerfiles时,它非常方便。

Given a file, repos.txt with a repository’s SSH link on each line (and your SSH keys set up), run:

给定文件repos.txt并在每行上包含存储库的SSH链接(并设置SSH密钥),运行:

xargs -n1 git clone < repos.txt

If you want to pull and push many repositories, I previously wrote about how to use a Bash one-liner to manage your repositories.

如果您想拉动很多存储库,我之前曾写过关于如何使用Bash一线管理存储库的文章 。

用数字表的问题jot (List issues by number with jot)

I’m a co-author and maintainer for the OWASP Web Security Testing Guide repository where I recently took one large issue (yup, it was “Fix all the broken links in the documentation” - how’d you guess?) and broke it up into several smaller, more manageable issues. A whole thirty-seven smaller, more manageable issues.

我是OWASP Web安全测试指南存储库的合著者和维护者,最近在该存储库中遇到了一个大问题(是的,这是“修复文档中所有断开的链接” –您怎么猜?)并破坏了它分成几个较小的,更易于管理的问题。 总共37个较小的,更易于管理的问题。

I wanted to enumerate all the issues that the original one became, but the idea of typing out thirty-seven issue numbers (#275 through #312) seemed awfully tedious and time-consuming. So, in natural programmer fashion, I spent the same amount of time I would have used to type out all those numbers and crafted a way to automate it instead.

我想列举一下原来的所有问题,但是输入37个问题编号(#275至#312)的想法似乎很繁琐且耗时。 因此,以自然的程序员方式,我花费了与原本要键入所有这些数字相同的时间,并设计了一种自动化的方法。

The jot utility (apt install athena-jot) is a tiny tool that’s a big help when you want to print out some numbers. Just tell it how many you want, and where to start and stop.

jot实用程序( apt install athena-jot )是一个很小的工具,当您要打印一些数字时, apt install athena-jot您有很大帮助。 只需告诉它您想要多少,以及在哪里开始和停止。

# jot [ reps [ begin [ end ] ] ]
jot 37 275 312

This prints each number, inclusively, from 275 to 312 on a new line. To make these into issue number notations that GitHub and many other platforms automatically recognize and turn into links, you can pipe the output to awk.

这会在新行上打印每个数字(包括275至312)。 为了使这些成为GitHub和许多其他平台自动识别并转化为链接的问题编号符号,您可以将输出传递给awk

jot 37 275 312 | awk '{printf "#"$0", "}'#275, #276, #277, #278, #279, #280, #281, #282, #283, #284, #285, #286, #287, #288, #289, #290, #291, #292, #293, #295, #296, #297, #298, #299, #300, #301, #302, #303, #304, #305, #306, #307, #308, #309, #310, #311, #312

You can also use jot to generate random or redundant data, mainly for development or testing purposes.

您还可以使用jot生成随机或冗余数据,主要用于开发或测试目的。

CLI驱动的开源组织 (CLI-powered open source organization)

A well-organized open source repository is a well-maintained open source project. Save this post for handy reference, and use your newfound CLI superpowers for good! 🚀

组织良好的开源资源库是维护良好的开源项目。 保存此帖子以方便参考,并永久使用您新发现的CLI超级功能! 🚀

翻译自: https://www.freecodecamp.org/news/command-line-tricks-for-managing-your-messy-open-source-repository/

win10管理凌乱桌面

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/390505.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JAVA数组Java StringBuffer 和 StringBuilder 类

版权声明&#xff1a;本文为博主原创文章&#xff0c;未经博主允许不得转载。 https://blog.csdn.net/qq_34173549/article/details/80215173 Java StringBuffer 和 StringBuilder 类 当对字符串进行修改的时候&#xff0c;需要使用 StringBuffer 和 StringBuilder 类。 和 Str…

strlen和sizeof的长度区别

strlen返回字符长度 而sizeof返回整个数组占多长&#xff0c;字符串的\0也会计入一个长度转载于:https://www.cnblogs.com/DawaTech/p/8086055.html

了解如何使用Yii2 PHP框架创建YouTube克隆

Yii is a fast, secure, and efficient PHP framework used to create all kinds of web apps. Weve released a full video course on how to use the Yii2 framework.Yii是一个快速&#xff0c;安全&#xff0c;高效PHP框架&#xff0c;用于创建各种Web应用程序。 我们已经发…

剑指 Offer 66. 构建乘积数组

给定一个数组 A[0,1,…,n-1]&#xff0c;请构建一个数组 B[0,1,…,n-1]&#xff0c;其中 B[i] 的值是数组 A 中除了下标 i 以外的元素的积, 即 B[i]A[0]A[1]…A[i-1]A[i1]…A[n-1]。不能使用除法。 示例: 输入: [1,2,3,4,5] 输出: [120,60,40,30,24] 提示&#xff1a; 所有…

Statement与PreparedStatement的区别

Statement与PreparedStatement的区别 PreparedStatement预编译SQL语句&#xff0c;性能好。 PreparedStatement无序拼接SQL语句&#xff0c;编程更简单. PreparedStatement可以防止SQL注入&#xff0c;安全性好。 Statement由方法createStatement()创建&#xff0c;该对象用于发…

剑指 Offer 45. 把数组排成最小的数

输入一个非负整数数组&#xff0c;把数组里所有数字拼接起来排成一个数&#xff0c;打印能拼接出的所有数字中最小的一个。 示例 1: 输入: [10,2] 输出: “102” 示例 2: 输入: [3,30,34,5,9] 输出: “3033459” 提示: 0 < nums.length < 100 说明: 输出结果可能非…

python 科学计算机_在这个免费的虚拟俱乐部中学习计算机科学和Python的基础知识

python 科学计算机Are you learning how to code in 2020? 您是否正在学习2020年编码&#xff1f; Or are you already working as a developer but want to learn computer science fundamentals? 还是您已经在从事开发人员工作&#xff0c;但想学习计算机科学基础知识&…

Struts2框架使用(十)之struts2的上传和下载

Struts2 文件上传 首先是Struts2的上传&#xff0c;Struts2 文件上传是基于 Struts2 拦截器实现的&#xff0c;使用的是fileupload组件&#xff1b; 首先如果想要上传文件&#xff0c;则需要在表单处添加 enctype"multipart/form-data" 属性。 <% page language&…

module_param 用于动态开启/关闭 驱动打印信息

1.定义模块参数的方法: module_param(name, type, perm); 其中,name:表示参数的名字; type:表示参数的类型; perm:表示参数的访问权限; type参数设定的类型和perm的访问权限具体数值数值请参考内核定义。 2、可以在insmod&#xff08;装载模块&#xff09;的时候为参…

超链接href属性_如何使用标签上的HREF属性制作HTML超链接

超链接href属性A website is a collection of web pages. And these pages need to be linked or connected by something. And to do so, we need to use a tag provided by HTML: the a tag. 网站是网页的集合。 这些页面需要通过某种方式链接或连接。 为此&#xff0c;我们需…

剑指 Offer 42. 连续子数组的最大和

输入一个整型数组&#xff0c;数组中的一个或连续多个整数组成一个子数组。求所有子数组的和的最大值。 要求时间复杂度为O(n)。 示例1: 输入: nums [-2,1,-3,4,-1,2,1,-5,4] 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大&#xff0c;为 6。 解题思路 对于一个数组&…

centos 7安装配置vsftpd

yum install -y vsftpd #安装vsftpd yum install -y psmisc net-tools systemd-devel libdb-devel perl-DBI #安装vsftpd虚拟用户配置依赖包 systemctl enable vsftpd.service #设置vsftpd开机启动 cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf-bak #备份默认配置文…

amazeui学习笔记--css(基本样式3)--文字排版Typography

amazeui学习笔记--css&#xff08;基本样式3&#xff09;--文字排版Typography 一、总结 1、字体&#xff1a;amaze默认非 衬线字体&#xff08;sans-serif&#xff09; 2、引用块blockquote和定义列表&#xff1a;引用块blockquote和定义列表&#xff08;dl dt&#xff09;注意…

剑指 Offer 46. 把数字翻译成字符串

给定一个数字&#xff0c;我们按照如下规则把它翻译为字符串&#xff1a;0 翻译成 “a” &#xff0c;1 翻译成 “b”&#xff0c;……&#xff0c;11 翻译成 “l”&#xff0c;……&#xff0c;25 翻译成 “z”。一个数字可能有多个翻译。请编程实现一个函数&#xff0c;用来计…

Zend Guard 7 , Zend Guard Loader处理PHP加密

环境&#xff1a;使用Zend Guard 7 软件加密。 PHP 5.6 LNMP 一键安装&#xff0c;PHP5.6Zend Guard Loader &#xff08;对应的版本文件&#xff09;是已经安装好了&#xff0c;还要安装 opcache.so ,直接在lnmp 安装教程中有。因为自动安装 的 版本并不对应&#xff0c;于…

qr码是二维码码_如何使用QR码进行有效的营销和推广

qr码是二维码码Efficient means doing things right. Effective is about doing the right things.高效意味着做正确的事。 有效就是做正确的事。 I am an advocate for efficiency and effectiveness. There must be a more efficient way to share contact details other th…

ELK学习记录三 :elasticsearch、logstash及kibana的安装与配置(windows)

注意事项&#xff1a; 1.ELK版本要求5.X以上 2.Elasticsearch5.x版本必须基于jdk1.8&#xff0c;安装环境必须使用jdk1.8 3.操作系统windows10作为测试环境&#xff0c;其他环境命令有差异&#xff0c;请注意 4.本教程适合完全离线安装 5.windows版本ELK安装包下载路径&#xf…

【quickhybrid】JSBridge的实现

前言 本文介绍quick hybrid框架的核心JSBridge的实现 由于在最新版本中&#xff0c;已经没有考虑iOS7等低版本&#xff0c;因此在选用方案时没有采用url scheme方式&#xff0c;而是直接基于WKWebView实现 交互原理 具体H5和Native的交互原理可以参考前文的H5和Native交互原理 …

mongodb atlas_如何使用MongoDB Atlas将MERN应用程序部署到Heroku

mongodb atlas简介 (Introduction to MERN) In this article, well be building and deploying an application built with the MERN stack to Heroku.在本文中&#xff0c;我们将构建和部署使用MERN堆栈构建的应用程序到Heroku。 MERN, which stands for MongoDB, Express, R…

面试题 10.02. 变位词组

编写一种方法&#xff0c;对字符串数组进行排序&#xff0c;将所有变位词组合在一起。变位词是指字母相同&#xff0c;但排列不同的字符串。 注意&#xff1a;本题相对原题稍作修改 示例: 输入: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], 输出: [ [“ate”,…