• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GitHub repos in your filesystem

GHFS - GitHub repos in your filesystem!

GHFS mounts to a directory using FUSE and serves contents of GitHub repos on-demand.

Let's try an example. First, generate a GitHub personal access token here -- it only needs the public_repo scope.

$ mkdir /github
$ go run main.go -token=$GITHUB_TOKEN -mountpoint=/github
2015/09/17 04:27:35 serving...

While that runs, in another terminal, list repos owned by a user or organization:

$ ls /github/golang/
appengine
arch
benchmarks
blog
...

You can inspect a repo's branches and tags as subdirectories of the repo:

$ ls /github/golang/go
...
master
...

And you can inspect the directories and files in the repo at those branches or tags:

$ ls /github/golang/go/master
AUTHORS
CONTRIBUTING.md
CONTRIBUTORS
LICENSE
...

If you know the specific revision you want to explore, you can use that instead of a branch or tag name:

$ ls /github/golang/go/3d1f8c237956ca657b9517040a7431e87f9d8a18
AUTHORS
CONTRIBUTING.md
CONTRIBUTORS
LICENSE
...

Or use any unique prefix of the revision SHA:

$ ls /github/golang/go/3d1f8c23

At a revision/branch/tag, you can explore the repo and read files:

$ cat /github/golang/go/master/src/bytes/bytes.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package bytes implements functions for the manipulation of byte slices.
// It is analogous to the facilities of the strings package.
package bytes

import (
	"unicode"
	"unicode/utf8"
)
...
$ wc -l /github/golang/go/master/src/bytes/bytes.go
     714 /github/golang/go/master/src/bytes/bytes.go
$ grep -n TODO /github/golang/go/master/src/bytes/bytes.go
429:// TODO: update when package unicode captures more of the properties.
$ diff \
  /github/golang/go/89454b1c/src/bytes/bytes.go \
  /github/golang/go/3d1f8c23/src/bytes/bytes.go
140a141,150
> // LastIndexByte returns the index of the last instance of c in s, or -1 if c is not present in s.
> func LastIndexByte(s []byte, c byte) int {
> 	for i := len(s) - 1; i >= 0; i-- {
> 		if s[i] == c {
> 			return i
> 		}
> 	}
> 	return -1
> }
> 

⚠️ Caveats ⚠️

  • This is a toy, and is not intended for anything like production use.
  • The GitHub API is rate-limited, and this makes a lot of API calls. Don't be surprised if things start to fall apart under load.
  • I'm not responsible for this somehow breaking free and ruining your garden party.

License

Copyright 2015 Jason Hall

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

gcping

411
star
2

kontain.me

Container image registry that serves images built fresh when you ask for them
Go
155
star
3

ImJasonH

33
star
4

rbac-audit

Generate K8s RBAC policies based on e2e test runs
Go
28
star
5

nopullrequests

GitHub Pull Request Rejection Bot
Go
27
star
6

setup-crane

21
star
7

gapi

Google API command-line client, written in Go
Go
16
star
8

csvstruct

Decode/encode CSV data into/from structs using reflection.
Go
14
star
9

simply-put

Simple REST JSON API for putting, getting, listing, updating and deleting data objects
Go
11
star
10

setup-ko

Go
10
star
11

spelling-bee

Generates NYT Spelling Bee puzzles and answers
Go
10
star
12

cosign-docker-cli-plugins

Docker CLI plugins for cosign
Shell
10
star
13

go-marvel

Go client library for Marvel API
Go
8
star
14

image-scraper

Automatically scrape image manifests and build a reverse index
7
star
15

gcloud-help

Shell
7
star
16

gke-auth

K8s cred helper and setup without gcloud
Go
7
star
17

chrome-sigstore

Chrome extension to manage Sigstore and Chainguard auth windows
JavaScript
7
star
18

client-go2

Go
6
star
19

tekless

Tekton without Kubernetes
Go
4
star
20

sbom-fun

Go
4
star
21

ideas

A place for me to file issues against myself for things I want to build when I'm bored
4
star
22

terraform-playground

We like to have fun here.
HCL
3
star
23

go-gist

Go import redirector for GitHub Gists
Go
3
star
24

nopr-action

3
star
25

deno-image

Shell
3
star
26

gifexplode

App Engine app to explode animated GIFs into frames
Go
3
star
27

miniko

Go
3
star
28

wasimg

Bundle wasm modules into OCI images
Go
3
star
29

delay

Go package to make Cloud Tasks simpler for Cloud Run applications
Go
3
star
30

quit.social

Just stay off the internet
HTML
3
star
31

buildpack-in-a-pod

3
star
32

syncer

WIP experiment
Go
2
star
33

combine

combine multi-platform images
Go
2
star
34

gorebuild

2
star
35

urls

Just checking if some URLs change.
Shell
2
star
36

build-task

Experimental Shipwright Build Custom Task for Tekton
Go
2
star
37

tros

tros lets you sort Go structs using reflection. Get it?
Go
2
star
38

drive-dedupe

App to scan for duplicate files in Google Drive, and (someday) delete them
Go
2
star
39

cargo-image

Go
2
star
40

wait-task

Go
1
star
41

spam-me

App Engine app to receive spam emails
Go
1
star
42

shipwright-cosign-example

Demo of using Shipwright to sign container images
Shell
1
star
43

tank-commander

Experimental rules for a table-top tank battle game
1
star
44

terraform-provider-melange

Go
1
star
45

cards

Simple Go library for abstracting playing cards
Go
1
star
46

setup-pack

Go
1
star
47

tekton-dev-scrape

https://tekton.dev
1
star
48

node-image

Example building a Node.js app into a container image, without Docker
Shell
1
star
49

crafty

Generate crafting patterns from small images
JavaScript
1
star
50

chaff

Report on unnecessary files in container images
Go
1
star
51

speak

Chrome extension to read text selections using Chrome's built-in TTS
JavaScript
1
star
52

diy

Go
1
star
53

sigstore-oidc-spiffe

Go
1
star
54

ko.build

1
star
55

push

Go
1
star
56

twitter-weather

Go
1
star
57

badidea

Go
1
star