labs / tiddlywiki / tiddlers / content / labs / lab02 / _Labs_02_Code Snippets.tid
@Mark George Mark George on 13 Jul 2020 1 KB Lab 2.
created: 20200702091026430
modified: 20200707005526287
section: 4.1
tags: lab02
title: /Labs/02/Code Snippets
type: text/x-markdown

You will regularly need to share code snippets and error messages when working with other people.  Most Git server software like GitBucket (Snippets)  and GitHub (Gists) have the ability to do this.

1.  Switch to GitBucket in your web browser.

1.  Click the <<menu "Snippets">> button at the top of the page.

1.  Click <<menu "New Snippet">> to create a snippet.

1.  Enter some text into the large text area.  You do not need to provide a description or file name.

1.  Click <<menu "Secret">>.  *Secret* mode allows you to give the URL to other people and they will be able to see the code, but it will not be visible to other GitBucket users.  *Private* mode means that only you can see it, and *Public* mode means that everyone can see it.

1.  Copy the URL in the browser's location bar.  Open another tab using the browser's private/incognito mode, and paste the URL.  You will need to log in to GitBucket again, since using private mode is pretty much the same as using an entirely different computer.  You should be able to see your code.

1. Delete your Snippet using the <<menu "Delete">> button.

If you have error messages or stack traces that you want to share with staff, then please use the Snippets feature.  We do not like receiving screenshots of text.  If you send us a screenshot of text, then you may receive a reply in the form of a screenshot of an email message.