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.pswp.cn/news/390505.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390505.shtml
英文地址,請注明出處:http://en.pswp.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”,…