1
00:00:00,210 --> 00:00:06,960
The next GitHub feature will cover our gists, so GitHub gists are a very simple way to share code snippets.

2
00:00:07,050 --> 00:00:11,040
If you're familiar with something called Pastebin, it's a very similar tool.

3
00:00:11,220 --> 00:00:18,420
It allows you to basically copy some code into agist and then save that and share it with other people

4
00:00:18,420 --> 00:00:19,810
or refer back to it later.

5
00:00:20,040 --> 00:00:25,830
You don't have access to all the GitHub repo features, but you have access to some of them, like forking,

6
00:00:25,830 --> 00:00:26,460
for example.

7
00:00:26,910 --> 00:00:29,790
So I'll just demonstrate it first to access.

8
00:00:29,790 --> 00:00:30,810
Just not over there.

9
00:00:30,990 --> 00:00:31,470
Over here.

10
00:00:31,470 --> 00:00:36,170
If you go to GitHub, I go to just GitHub Dotcom.

11
00:00:36,420 --> 00:00:38,990
Now, I'm sure there's a button somewhere.

12
00:00:39,810 --> 00:00:46,500
I think it's actually if we go here to your profile and then your gists, I think that's the easiest

13
00:00:46,500 --> 00:00:47,100
way to get there.

14
00:00:47,100 --> 00:00:51,200
Maybe there's another way without just typing gists, dot, GitHub, dotcom.

15
00:00:51,870 --> 00:00:54,420
So it's a different page, right?

16
00:00:54,430 --> 00:00:58,080
We see my personal list of gists.

17
00:00:58,080 --> 00:01:01,190
Actually, I don't use them very frequently on this account.

18
00:01:01,200 --> 00:01:03,330
Most of these are from when I was teaching lectures.

19
00:01:03,870 --> 00:01:05,070
But I could just show you one.

20
00:01:05,490 --> 00:01:08,940
Let's say here are some exercise I made for students.

21
00:01:09,510 --> 00:01:11,490
So this is an HTML file.

22
00:01:13,320 --> 00:01:17,850
OK, so there's this HTML file, I don't remember what this exercise was, but I was asking students

23
00:01:17,850 --> 00:01:21,690
to do, but there's the ability to leave comments.

24
00:01:22,350 --> 00:01:26,250
I can personally delete this file or edit this file.

25
00:01:27,060 --> 00:01:28,290
I can download it.

26
00:01:28,870 --> 00:01:30,180
I can share it with people.

27
00:01:30,180 --> 00:01:31,890
They can it and starret.

28
00:01:32,460 --> 00:01:34,680
So I'll show you if I go to all allergist's.

29
00:01:35,860 --> 00:01:42,670
I can see a discovery page, so these are gists that other people have made, so they range from markdown

30
00:01:42,670 --> 00:01:45,430
files like I don't know exactly what this is.

31
00:01:46,230 --> 00:01:52,960
It looks like some sort of checklist for turning in work, maybe on GitHub.

32
00:01:54,310 --> 00:01:58,480
So there's whoever this person is made that just in its public.

33
00:01:58,750 --> 00:01:59,680
But here's another one.

34
00:01:59,690 --> 00:02:02,020
This looks like some sort of iOS script.

35
00:02:03,050 --> 00:02:08,840
So here's a swift script, there's two files which you can do and then you can make private just as

36
00:02:08,840 --> 00:02:09,120
well.

37
00:02:09,740 --> 00:02:13,930
So I use these when I'm teaching to share stuff, but you'll see them occasionally.

38
00:02:13,940 --> 00:02:15,890
I can read it or different Web pages.

39
00:02:16,310 --> 00:02:21,740
People will share code this way, a full GitHub repository where you have to push up and, you know,

40
00:02:21,980 --> 00:02:23,030
set up your remotes.

41
00:02:23,030 --> 00:02:24,200
And all of that can be annoying.

42
00:02:24,380 --> 00:02:25,940
This you can do very easily.

43
00:02:26,150 --> 00:02:31,550
So if I want to make a new just, it's just a matter of clicking the plus sign here and then I enter

44
00:02:31,550 --> 00:02:32,440
a file name.

45
00:02:32,660 --> 00:02:36,950
So what do I want to share with somebody or what do I want to store in agist?

46
00:02:37,190 --> 00:02:43,910
Well, actually, here's a gist I've been using personally as I'm making this course where I've set

47
00:02:43,910 --> 00:02:46,550
up my computer to have two different GitHub accounts.

48
00:02:46,550 --> 00:02:50,210
And it's been kind of frustrating to have to switch between them.

49
00:02:50,600 --> 00:02:54,110
But this is a gist that somebody made to share this person.

50
00:02:54,120 --> 00:02:54,320
OK.

51
00:02:54,520 --> 00:02:55,750
Oh, OK.

52
00:02:56,100 --> 00:02:57,290
OK, let's see.

53
00:02:57,540 --> 00:03:02,060
Oh, and when I'm very sorry, I'm sure I completely butchered that.

54
00:03:02,270 --> 00:03:07,580
Anyway, this just talks about having multiple GitHub accounts, wanting to use them both on the same

55
00:03:07,580 --> 00:03:11,750
computer, how to set up your SSL config file, which is exactly what I did.

56
00:03:11,750 --> 00:03:17,390
I followed these instructions how to add the two private keys, how to test your connection, and then

57
00:03:17,390 --> 00:03:23,180
it allows people to discuss and post about their error messages or other suggestions.

58
00:03:23,450 --> 00:03:25,070
So this is very, very useful.

59
00:03:25,820 --> 00:03:31,410
It could have been a full fledged GitHub repo with just one file in it, but it just is more appropriate.

60
00:03:31,940 --> 00:03:37,790
So if I wanted to just try recreating some of this myself, this happens to be a markdown down file,

61
00:03:38,000 --> 00:03:38,300
right?

62
00:03:38,300 --> 00:03:43,000
So made a lot of just are marked down, but they can be any file extension.

63
00:03:43,400 --> 00:03:47,780
I'm just going to copy this to show you, although with this I'm not plagiarizing his work.

64
00:03:48,530 --> 00:03:50,900
OK, so I can now name this.

65
00:03:50,900 --> 00:03:55,000
I'll call this, you know, I don't know, GitHub.

66
00:03:55,310 --> 00:03:56,630
How about multiple.

67
00:03:58,470 --> 00:04:02,540
GitHub, S.H., Dot, MD.

68
00:04:02,620 --> 00:04:08,400
If I do that MD, it now highlights it as marked down and then I can choose to create a secret just

69
00:04:08,820 --> 00:04:09,960
or a public gist.

70
00:04:10,260 --> 00:04:11,580
I'll just create a secret one.

71
00:04:12,090 --> 00:04:14,760
I can add a description of created.

72
00:04:15,420 --> 00:04:18,540
And now I have this just that I can come back to at any point.

73
00:04:19,290 --> 00:04:21,900
And that's pretty much all that there is to a secret.

74
00:04:21,900 --> 00:04:24,570
Just so I can edit it, I can write some comments.

75
00:04:25,140 --> 00:04:31,620
I can also have just, I believe, within the company that I work at and share just with people, keep

76
00:04:31,620 --> 00:04:36,750
them secret so they're not public facing but have collaborators I can edit.

77
00:04:37,080 --> 00:04:39,720
But that's just the raw I can edit this way.

78
00:04:39,870 --> 00:04:46,080
I can even add files so I could add some other file, like a JavaScript file and it will highlight it

79
00:04:46,080 --> 00:04:47,190
as JavaScript.

80
00:04:47,430 --> 00:04:48,600
Hopefully you can see that.

81
00:04:49,020 --> 00:04:50,440
I guess it's a bit small.

82
00:04:50,460 --> 00:04:50,990
There you go.

83
00:04:51,270 --> 00:04:56,730
So it's getting JavaScript syntax highlighting and that's kind of all that there is to gists.

84
00:04:57,000 --> 00:04:59,370
So this one, again, is secret.

85
00:04:59,370 --> 00:05:02,790
It's private, but I could make a new gist instead.

86
00:05:03,150 --> 00:05:09,990
Just make it public here and anybody could see that on my account and anybody can see anybody else's

87
00:05:09,990 --> 00:05:10,320
public.

88
00:05:10,320 --> 00:05:13,350
Just as you saw here, there's this discovery feature.

89
00:05:13,650 --> 00:05:18,720
I never, ever really use this, I guess, except for this video where I'm showing you it.

90
00:05:19,350 --> 00:05:23,250
It's pretty rare that I just want to stumble across random gists anyway.

91
00:05:24,120 --> 00:05:25,410
That's all there is to GitHub.

92
00:05:25,410 --> 00:05:29,220
Gist You can have multiple files, different file types, different extensions.

93
00:05:29,520 --> 00:05:31,500
You can share them, you can keep them secret.

94
00:05:31,770 --> 00:05:38,700
They are, I believe, behind the scenes actual git repositories, although they don't expose the same

95
00:05:38,700 --> 00:05:42,810
features on GitHub that we normally have access to with a full fledged repo.

96
00:05:43,050 --> 00:05:45,480
But we can see revisions, we can see diffs.

97
00:05:46,140 --> 00:05:49,470
So there is a history here, but they're just very slimmed down.

98
00:05:49,470 --> 00:05:53,730
The actual interface is very streamlined compared to a full GitHub repository.

99
00:05:53,880 --> 00:05:55,800
So that about wraps it up for GitHub gists.
