天天看點

html5怎麼共享代碼_快速共享代碼的前5個地方

html5怎麼共享代碼

html5怎麼共享代碼_快速共享代碼的前5個地方

Collaborative development or getting development help from your peers online dictates that you share code with people, but that’s not always possible. If you’re on IRC, pasting giant blocks of code into a public chat channel is annoying for everyone else, and sharing code via instant messenger or email is clumsy, slow, and hard to read (since those tools lack code formatting and line numbering).

協作開發或線上上獲得同仁的開發幫助訓示您與他人共享代碼,但這并不總是可能的。 如果您使用的是IRC,則将巨大的代碼塊粘貼到公共聊天頻道中會讓其他人感到煩惱,而通過即時通訊工具或電子郵件共享代碼則笨拙,緩慢且難以閱讀(因為這些工具缺少代碼格式和行号) )。

That’s where pastebins come in. Pastebins allow developers to post code snippets at shareable, throwaway URLs in order to easily swap code back and forth unobtrusively with one another. There are a large number of pastebin sites, and the differences between them are generally minor. However, below is a list of our top five places to easily and quickly share code. Presented in no particular order.

這就是pastebins的用處。Pastebins允許開發人員在可共享的一次性URL上釋出代碼段,以便輕松地彼此之間來回交換代碼。 pastebin站點數量很多,它們之間的差異通常很小。 但是,以下是我們輕松快速共享代碼的前五個位置的清單。 按無特定順序顯示。

糊狀 (Pastie)

Pastie isn’t the most feature rich pastebin site out there, nor does it support the most languages, but it is one of the most elegant. What Pastie lacks in features, it makes up for in simplicity and beauty. The site offers private pasting and pastes don’t expire. For more feature rich code pasting, check out Paste2, Pastebin.com, Lodge It, Pastebin.ca, and GnoPaste.

Pastie并不是目前功能最豐富的pastebin網站,也不支援大多數語言,但它是最優雅的網站之一。 Pastie所缺乏的功能,是其簡單性和美感的補充。 該網站提供私人粘貼,粘貼不會過期。 欲了解更多功能豐富的代碼粘貼,檢查出Paste2 , Pastebin.com , 洛奇它 , Pastebin.ca和GnoPaste 。

要旨 (Gist)

Gist is one of the most robust paste tools on the Internet. What sets it apart from other pastebins? How about versioning, SSL security for private pastes, support for embedding pastes on other sites, and the ability to push and pull pastes using Git. Like parent site GitHub, public pastes on Gist (called, not surprisingly, “gists”) can be forked by other users with the click of a button.

Gist是Internet上最強大的粘貼工具之一。 是什麼讓它與其他粘貼框區分開? 版本控制,私有粘貼的SSL安全性,對在其他站點上粘貼粘貼的支援以及使用Git推送和拉取粘貼的能力如何? 就像父網站GitHub一樣,其他使用者隻要單擊一下按鈕,便可以在Gist上公開粘貼(俗稱“ gists”)。

GitHub’s active user community has also contributed to Gist by creating a growing ecosystem of extensions, such as auto-posting to Tumblr and Textmate support. You can even serve Greasemonkey scripts from Gist. Very cool.

GitHub的活躍使用者社群還通過建立一個不斷擴充的擴充生态系統(例如自動釋出到Tumblr和Textmate支援)為Gist做出了貢獻。 您甚至可以從Gist 提供Greasemonkey腳本 。 很酷。

小貼 (TinyPaste)

If you crave pasting that is more succinct and to the point, then perhaps TinyPaste is for you. TinyPaste is a barebones pastebin. Just enter your code and go. No futzing with names, descriptions, choosing a language, etc. Unfortunately that also means syntax highlighting is out the window. But if you just want to paste and go, then TinyPaste might be what you’re looking for. The site also has a Firefox plugin that allows you to paste text from any text source (within the browser) and get the paste URL without ever visiting the TinyPaste site, and it has an API.

如果您希望粘貼更簡潔明了,那麼TinyPaste也許适合您。 TinyPaste是準系統pastebin。 隻需輸入您的代碼即可。 無需混淆名稱,描述,選擇語言等。不幸的是,這也意味着高亮顯示文法。 但是,如果您隻是想粘貼并粘貼,那麼TinyPaste可能就是您想要的。 該網站還具有Firefox插件,該插件可讓您從任何文本源(在浏覽器中)粘貼文本并獲得粘貼URL,而無需通路TinyPaste網站,并且它具有API 。

Also see Snipt, which is billed as a pastebin for Twitter. Theoretically, that means it should function much the same way TwitPic does for images — unfortunately, right now it appears to just be a run of the mill paste site with short URLs for pastes. Hopefully they add things like auto-post to Twitter and the ability to target pastes at specific users via @ replies.

另請參閱Snipt ,它被标為Twitter的pastebin。 從理論上講,這意味着它的功能應與TwitPic處理圖像的方式大緻相同-不幸的是,現在看來,它似乎隻是軋機粘貼站點的一部分,帶有用于粘貼的短URL。 希望他們在Twitter上添加自動釋出等功能,并能夠通過@回複将粘貼目标定位到特定使用者。

乙太闆 (EtherPad)

EtherPad is not actually a paste site, but if your reason for pasting is because you’re working through a coding problem with a collaborator, then it might be better than any other site on this list. EtherPad lets users collaborate in real time on text documents. Users each join a workspace and can watch each other make changes in real time — if user A types something new, user B sees it appear on his screen in real time.

EtherPad實際上不是粘貼站點,但是如果您粘貼的原因是因為您正在與協作者一起解決編碼問題,那麼它可能比此清單上的任何其他站點都要好。 EtherPad允許使用者在文本文檔上進行實時協作。 每個使用者都加入一個工作區,并且可以彼此觀看實時更改—如果使用者A輸入新内容,則使用者B會看到它實時顯示在螢幕上。

Because EtherPad isn’t a real pastebin, it doesn’t support syntax highlighting for many languages, but adding that should be fairly trivial. It does have line numbering, though, so even lacking syntax highlighting, it should be suitable for collaboratively working through a coding issue in ways that a static pastebin couldn’t hope to match.

由于EtherPad不是真正的pastebin,是以它不支援多種語言的文法高亮顯示,但是添加它應該是相當瑣碎的。 但是,它确實具有行号,是以,即使缺少文法突出顯示,它也應該适合于以靜态pastebin無法希望比對的方式協作解決編碼問題。

狙擊手 (Snipplr)

Like EtherPad, Snipplr also isn’t really a pastebin. Rather, Snipplr is a public code snippet library, and one of the best. If you want to share your code bits with more than just a few people, Snipplr is a great place. It is a very well designed snippet site with over 10,000 snippets. They have a Textmate bundle, a WordPress plugin, Firefox and Safari bookmarklets, and even a plugin for the somewhat more obscure Gnome text editor Gedit.

像EtherPad一樣, Snipplr也不是真正的pastebin。 相反,Snipplr是公共代碼段庫,也是最好的庫之一。 如果您想與不止幾個人共享您的代碼位,Snipplr是個好地方。 這是一個經過精心設計的摘要站點,包含10,000多個摘要。 他們有一個Textmate捆綁包,一個WordPress插件,Firefox和Safari小書簽,甚至還有一個稍微模糊的Gnome文本編輯器Gedit的插件。

Also check out DZone Snippets, which is another large public snippet site.

還可以檢視DZone代碼段 ,這是另一個大型代碼段網站。

If you know of any other good sites or methods to share your code, please share them in the comments below. And if you liked this post, be sure to check out 7 Places to Find the Code You Need.

如果您知道共享代碼的其他好網站或方法,請在下面的評論中分享。 如果您喜歡這篇文章,請務必檢視7個查找所需代碼的地方 。

翻譯自: https://www.sitepoint.com/top-5-places-to-share-code-quickly/

html5怎麼共享代碼