@@ -84,8 +84,8 @@ rate_limit()
84
84
85
85
```
86
86
#> Rate limit: 5000
87
- #> Remaining: 4908
88
- #> Resets in: 49 minutes
87
+ #> Remaining: 4224
88
+ #> Resets in: 43 minutes
89
89
```
90
90
91
91
@@ -100,22 +100,22 @@ gists(per_page = 2)
100
100
101
101
```
102
102
#> [[1]]
103
- #> <gist>9a61e3d5b74722824309
104
- #> URL: https://gist.github.com/9a61e3d5b74722824309
105
- #> Description: FunctionSet model for Chainer based Convolutional Denoising Autoencoder
103
+ #> <gist>4baa80440a1e0cdb4b195872762c6251
104
+ #> URL: https://gist.github.com/4baa80440a1e0cdb4b195872762c6251
105
+ #> Description: Elimination (PuzzleScript Script)
106
106
#> Public: TRUE
107
- #> Created/Edited: 2015 -07-03T00:20:15Z / 2015 -07-03T00:20:16Z
108
- #> Files: conv_dae.py
109
- #> Truncated?: FALSE
107
+ #> Created/Edited: 2019 -07-18T17:39:06Z / 2019 -07-18T17:39:06Z
108
+ #> Files: readme.txt, script.txt
109
+ #> Truncated?: FALSE, FALSE
110
110
#>
111
111
#> [[2]]
112
- #> <gist>4ae08d3a0bc3ac4862da
113
- #> URL: https://gist.github.com/4ae08d3a0bc3ac4862da
114
- #> Description: Bootstrap Customizer Config
112
+ #> <gist>9f15e4d4c5f02b56cc634c31dd9f4153
113
+ #> URL: https://gist.github.com/9f15e4d4c5f02b56cc634c31dd9f4153
114
+ #> Description: rubberduck v1.4.3 - Passed - Package Tests Results
115
115
#> Public: TRUE
116
- #> Created/Edited: 2015 -07-03T00:19:29Z / 2015 -07-03T00:19:29Z
117
- #> Files: config.json
118
- #> Truncated?: FALSE
116
+ #> Created/Edited: 2019 -07-18T17:39:05Z / 2019 -07-18T17:39:06Z
117
+ #> Files: 1.RegistrySnapshot.xml, FilesSnapshot.xml, Install.txt, Uninstall.txt, _Summary.md
118
+ #> Truncated?: FALSE, FALSE, FALSE, FALSE, FALSE
119
119
```
120
120
121
121
Since a certain date/time
@@ -127,22 +127,22 @@ gists(since = '2014-05-26T00:00:00Z', per_page = 2)
127
127
128
128
```
129
129
#> [[1]]
130
- #> <gist>9a61e3d5b74722824309
131
- #> URL: https://gist.github.com/9a61e3d5b74722824309
132
- #> Description: FunctionSet model for Chainer based Convolutional Denoising Autoencoder
130
+ #> <gist>4baa80440a1e0cdb4b195872762c6251
131
+ #> URL: https://gist.github.com/4baa80440a1e0cdb4b195872762c6251
132
+ #> Description: Elimination (PuzzleScript Script)
133
133
#> Public: TRUE
134
- #> Created/Edited: 2015 -07-03T00:20:15Z / 2015 -07-03T00:20:16Z
135
- #> Files: conv_dae.py
136
- #> Truncated?: FALSE
134
+ #> Created/Edited: 2019 -07-18T17:39:06Z / 2019 -07-18T17:39:06Z
135
+ #> Files: readme.txt, script.txt
136
+ #> Truncated?: FALSE, FALSE
137
137
#>
138
138
#> [[2]]
139
- #> <gist>4ae08d3a0bc3ac4862da
140
- #> URL: https://gist.github.com/4ae08d3a0bc3ac4862da
141
- #> Description: Bootstrap Customizer Config
139
+ #> <gist>9f15e4d4c5f02b56cc634c31dd9f4153
140
+ #> URL: https://gist.github.com/9f15e4d4c5f02b56cc634c31dd9f4153
141
+ #> Description: rubberduck v1.4.3 - Passed - Package Tests Results
142
142
#> Public: TRUE
143
- #> Created/Edited: 2015 -07-03T00:19:29Z / 2015 -07-03T00:19:29Z
144
- #> Files: config.json
145
- #> Truncated?: FALSE
143
+ #> Created/Edited: 2019 -07-18T17:39:05Z / 2019 -07-18T17:39:06Z
144
+ #> Files: 1.RegistrySnapshot.xml, FilesSnapshot.xml, Install.txt, Uninstall.txt, _Summary.md
145
+ #> Truncated?: FALSE, FALSE, FALSE, FALSE, FALSE
146
146
```
147
147
148
148
Request different types of gists, one of public, minepublic, mineall, or starred.
@@ -154,21 +154,21 @@ gists('minepublic', per_page = 2)
154
154
155
155
```
156
156
#> [[1]]
157
- #> <gist>4fd5a913e911ad70098c
158
- #> URL: https://gist.github.com/4fd5a913e911ad70098c
157
+ #> <gist>52f6dab219e0f2ca3f71cf70cafa11a3
158
+ #> URL: https://gist.github.com/52f6dab219e0f2ca3f71cf70cafa11a3
159
159
#> Description:
160
160
#> Public: TRUE
161
- #> Created/Edited: 2015-07-03T00:19:18Z / 2015-07-03T00:19:22Z
162
- #> Files: code .R
161
+ #> Created/Edited: 2019-04-24T16:38:20Z / 2019-04-24T16:38:43Z
162
+ #> Files: crul-eg .R
163
163
#> Truncated?: FALSE
164
164
#>
165
165
#> [[2]]
166
- #> <gist>974fd41ff30de9814cc1
167
- #> URL: https://gist.github.com/974fd41ff30de9814cc1
168
- #> Description: a new cool gist
166
+ #> <gist>79507e3c5b905f605648797d849c1126
167
+ #> URL: https://gist.github.com/79507e3c5b905f605648797d849c1126
168
+ #> Description:
169
169
#> Public: TRUE
170
- #> Created/Edited: 2015-07-03T00:19:18Z / 2015-07-03T00:19:18Z
171
- #> Files: stuff .md
170
+ #> Created/Edited: 2019-02-22T20:31:58Z / 2019-02-22T20:31:58Z
171
+ #> Files: classification_munging .md
172
172
#> Truncated?: FALSE
173
173
```
174
174
@@ -185,7 +185,7 @@ gist(id = 'f1403260eb92f5dfa7e1')
185
185
#> URL: https://gist.github.com/f1403260eb92f5dfa7e1
186
186
#> Description: Querying bitly from R
187
187
#> Public: TRUE
188
- #> Created/Edited: 2014-10-15T20:40:12Z / 2014-10-15T21:54:29Z
188
+ #> Created/Edited: 2014-10-15T20:40:12Z / 2015-08-29T14:07:43Z
189
189
#> Files: bitly_r.md
190
190
#> Truncated?: FALSE
191
191
```
@@ -212,11 +212,11 @@ gist_create(files = stuffpath, description = 'a new cool gist', browse = FALSE)
212
212
```
213
213
214
214
```
215
- #> <gist>f6d0df13305a082f5247
216
- #> URL: https://gist.github.com/f6d0df13305a082f5247
215
+ #> <gist>9984709a30889023bd79e489a7d50860
216
+ #> URL: https://gist.github.com/9984709a30889023bd79e489a7d50860
217
217
#> Description: a new cool gist
218
218
#> Public: TRUE
219
- #> Created/Edited: 2015 -07-03T00:20:27Z / 2015 -07-03T00:20:27Z
219
+ #> Created/Edited: 2019 -07-18T17:39:09Z / 2019 -07-18T17:39:09Z
220
220
#> Files: stuff.md
221
221
#> Truncated?: FALSE
222
222
```
@@ -235,11 +235,11 @@ numbers
235
235
```
236
236
237
237
```
238
- #> <gist>f80330754db203f8bb03
239
- #> URL: https://gist.github.com/f80330754db203f8bb03
238
+ #> <gist>46b8f33a29f14f7c71fc409020cd6e43
239
+ #> URL: https://gist.github.com/46b8f33a29f14f7c71fc409020cd6e43
240
240
#> Description:
241
241
#> Public: TRUE
242
- #> Created/Edited: 2015 -07-03T00:20:27Z / 2015 -07-03T00:20:27Z
242
+ #> Created/Edited: 2019 -07-18T17:39:11Z / 2019 -07-18T17:39:11Z
243
243
#> Files: code.R
244
244
#> Truncated?: FALSE
245
245
```
@@ -285,11 +285,11 @@ run(file, knitopts = list(quiet = TRUE)) %>% gist_create(browse = FALSE)
285
285
```
286
286
287
287
```
288
- #> <gist>f6214845b1f64dac34e9
289
- #> URL: https://gist.github.com/f6214845b1f64dac34e9
288
+ #> <gist>43b3e21059b86fef954eb08a3d3286ee
289
+ #> URL: https://gist.github.com/43b3e21059b86fef954eb08a3d3286ee
290
290
#> Description:
291
291
#> Public: TRUE
292
- #> Created/Edited: 2015 -07-03T00:20:27Z / 2015 -07-03T00:20:27Z
292
+ #> Created/Edited: 2019 -07-18T17:39:13Z / 2019 -07-18T17:39:13Z
293
293
#> Files: stuff.md
294
294
#> Truncated?: FALSE
295
295
```
@@ -323,10 +323,10 @@ gists()[[1]] %>% commits()
323
323
```
324
324
#> [[1]]
325
325
#> <commit>
326
- #> Version: aa6fd931a73dee814401790c0367ac672711d975
327
- #> User: sckott
328
- #> Commited: 2015 -07-03T00:20:27Z
329
- #> Commits [total, additions, deletions]: [5,5 ,0]
326
+ #> Version: 470b3fbdf638a083ede94d7ae7fd42f0560180dd
327
+ #> User: ereastman616
328
+ #> Commited: 2019 -07-18T17:39:13Z
329
+ #> Commits [total, additions, deletions]: [123,123 ,0]
330
330
```
331
331
332
332
## Star a gist
@@ -335,34 +335,34 @@ Star
335
335
336
336
337
337
``` r
338
- gist(' 7ddb9810fc99c84c65ec ' ) %> % star()
338
+ gist(' b564093d359eb735138a97258d03f333 ' ) %> % star()
339
339
```
340
340
341
341
```
342
- #> <gist>7ddb9810fc99c84c65ec
343
- #> URL: https://gist.github.com/7ddb9810fc99c84c65ec
342
+ #> <gist>b564093d359eb735138a97258d03f333
343
+ #> URL: https://gist.github.com/b564093d359eb735138a97258d03f333
344
344
#> Description:
345
345
#> Public: TRUE
346
- #> Created/Edited: 2014-06-27T17:50 :37Z / 2015-07-03T00:19:20Z
347
- #> Files: code.R, manifest.yml, rrt_manifest.yml
348
- #> Truncated?: FALSE, FALSE, FALSE
346
+ #> Created/Edited: 2018-10-03T19:07 :37Z / 2018-10-03T19:07:37Z
347
+ #> Files: rcrossref-references.md
348
+ #> Truncated?: FALSE
349
349
```
350
350
351
351
Unstar
352
352
353
353
354
354
``` r
355
- gist(' 7ddb9810fc99c84c65ec ' ) %> % unstar()
355
+ gist(' b564093d359eb735138a97258d03f333 ' ) %> % unstar()
356
356
```
357
357
358
358
```
359
- #> <gist>7ddb9810fc99c84c65ec
360
- #> URL: https://gist.github.com/7ddb9810fc99c84c65ec
359
+ #> <gist>b564093d359eb735138a97258d03f333
360
+ #> URL: https://gist.github.com/b564093d359eb735138a97258d03f333
361
361
#> Description:
362
362
#> Public: TRUE
363
- #> Created/Edited: 2014-06-27T17:50 :37Z / 2015 -07-03T00:20:29Z
364
- #> Files: code.R, manifest.yml, rrt_manifest.yml
365
- #> Truncated?: FALSE, FALSE, FALSE
363
+ #> Created/Edited: 2018-10-03T19:07 :37Z / 2019 -07-18T17:39:15Z
364
+ #> Files: rcrossref-references.md
365
+ #> Truncated?: FALSE
366
366
```
367
367
368
368
## Update a gist
@@ -384,11 +384,11 @@ gists(what = "minepublic")[[1]] %>%
384
384
```
385
385
386
386
```
387
- #> <gist>f80330754db203f8bb03
388
- #> URL: https://gist.github.com/f80330754db203f8bb03
387
+ #> <gist>46b8f33a29f14f7c71fc409020cd6e43
388
+ #> URL: https://gist.github.com/46b8f33a29f14f7c71fc409020cd6e43
389
389
#> Description:
390
390
#> Public: TRUE
391
- #> Created/Edited: 2015 -07-03T00:20:27Z / 2015 -07-03T00:20:29Z
391
+ #> Created/Edited: 2019 -07-18T17:39:11Z / 2019 -07-18T17:39:16Z
392
392
#> Files: alm.md, code.R
393
393
#> Truncated?: FALSE, FALSE
394
394
```
@@ -403,11 +403,11 @@ gists(what = "minepublic")[[1]] %>%
403
403
```
404
404
405
405
```
406
- #> <gist>f80330754db203f8bb03
407
- #> URL: https://gist.github.com/f80330754db203f8bb03
406
+ #> <gist>46b8f33a29f14f7c71fc409020cd6e43
407
+ #> URL: https://gist.github.com/46b8f33a29f14f7c71fc409020cd6e43
408
408
#> Description:
409
409
#> Public: TRUE
410
- #> Created/Edited: 2015 -07-03T00:20:27Z / 2015 -07-03T00:20:30Z
410
+ #> Created/Edited: 2019 -07-18T17:39:11Z / 2019 -07-18T17:39:18Z
411
411
#> Files: code.R
412
412
#> Truncated?: FALSE
413
413
```
@@ -429,7 +429,7 @@ gists()[[1]] %>% embed()
429
429
```
430
430
431
431
```
432
- #> [1] "<script src=\"https://gist.github.com/sckott/f80330754db203f8bb03 .js\"></script>"
432
+ #> [1] "<script src=\"https://gist.github.com/ereastman616/edbc570a99738505d4eef196e4ae7cba .js\"></script>"
433
433
```
434
434
435
435
### List forks
@@ -447,7 +447,7 @@ gist(id = '1642874') %>% forks(per_page = 2)
447
447
#> URL: https://gist.github.com/1642989
448
448
#> Description: Spline Transition
449
449
#> Public: TRUE
450
- #> Created/Edited: 2012-01-19T21:45:20Z / 2015-06-11T19:40 :48Z
450
+ #> Created/Edited: 2012-01-19T21:45:20Z / 2019-04-30T00:23 :48Z
451
451
#> Files:
452
452
#> Truncated?:
453
453
#>
@@ -456,7 +456,7 @@ gist(id = '1642874') %>% forks(per_page = 2)
456
456
#> URL: https://gist.github.com/1643051
457
457
#> Description: Line Transition (Broken)
458
458
#> Public: TRUE
459
- #> Created/Edited: 2012-01-19T21:51:30Z / 2015-06-11T19:40:48Z
459
+ #> Created/Edited: 2012-01-19T21:51:30Z / 2018-09-29T06:16:06Z
460
460
#> Files:
461
461
#> Truncated?:
462
462
```
@@ -472,18 +472,18 @@ g <- gists()
472
472
```
473
473
474
474
```
475
- #> <gist>9eff44494c12fcbc8590
476
- #> URL: https://gist.github.com/9eff44494c12fcbc8590
475
+ #> <gist>8f9f96b67c67fd4a3a6b352674f95602
476
+ #> URL: https://gist.github.com/8f9f96b67c67fd4a3a6b352674f95602
477
477
#> Description:
478
478
#> Public: TRUE
479
- #> Created/Edited: 2015 -07-03T00:20:31Z / 2015 -07-03T00:20:31Z
480
- #> Files: gistfile1.txt, gistfile2.txt
481
- #> Truncated?: FALSE, FALSE
479
+ #> Created/Edited: 2019 -07-18T17:39:22Z / 2019 -07-18T17:39:22Z
480
+ #> Files: gistfile1.txt
481
+ #> Truncated?: FALSE
482
482
```
483
483
484
484
485
485
486
- ## Example use case
486
+ ## Example use cases
487
487
488
488
_ Working with the Mapzen Pelias geocoding API_
489
489
@@ -507,3 +507,38 @@ gist_create(code = json, filename = "pelias_test.geojson")
507
507
And here's that gist: [ https://gist.github.com/sckott/017214637bcfeb198070 ] ( https://gist.github.com/sckott/017214637bcfeb198070 )
508
508
509
509
![ ] ( img/gistr_ss.png )
510
+
511
+ _ Round-trip storage of a data frame_
512
+
513
+ Maybe you want to use a gist to share some data as an alternative to ` dput ` ? We can do this by writing our ` data.frame ` to a temporary buffer and passing it to ` gist_create ` . We can read the data back from the gist by passing its content to ` read.csv ` .
514
+
515
+
516
+ ``` r
517
+ data(iris )
518
+
519
+ str <- ' '
520
+ tc <- textConnection(' str' , ' w' , local = TRUE )
521
+ write.csv(iris , file = tc , row.names = FALSE )
522
+ close(tc )
523
+
524
+ content <- list (content = paste(as.character(str ), collapse = ' \n ' ))
525
+
526
+ gistr :: gist_create(code = {
527
+ content $ content
528
+ }, description = " using a gist as a data store" ,
529
+ filename = " iris.csv" )
530
+ # > <gist>c7dfe593f4944df4818df884689734f9
531
+ # > URL: https://gist.github.com/c7dfe593f4944df4818df884689734f9
532
+ # > Description: using a gist as a data store
533
+ # > Public: TRUE
534
+ # > Created/Edited: 2019-07-18T14:23:23Z / 2019-07-18T14:23:23Z
535
+ # > Files: iris.csv
536
+ # > Truncated?: FALSE
537
+
538
+ output <- read.csv(
539
+ text = gist(gists(what = " minepublic" , per_page = 1 )[[1 ]]$ id )$
540
+ files $ iris.csv $ content )
541
+
542
+ identical(output , iris )
543
+ # > TRUE
544
+ ```
0 commit comments