-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from jianboy/gogs1s
Gogs1s v1.0
- Loading branch information
Showing
68 changed files
with
838 additions
and
5,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
name: Deploy on tags | ||
# name: Deploy on tags | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
# on: | ||
# push: | ||
# tags: | ||
# - v* | ||
|
||
jobs: | ||
deploy: | ||
# jobs: | ||
# deploy: | ||
|
||
runs-on: ubuntu-latest | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Setup Node | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: '14.x' | ||
|
||
- run: yarn --frozen-lockfile | ||
- run: yarn build | ||
- run: yarn hash | ||
# - run: yarn --frozen-lockfile | ||
# - run: yarn build | ||
# - run: yarn hash | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
cname: github1s.com | ||
keep_files: true | ||
# - name: Deploy | ||
# uses: peaceiris/actions-gh-pages@v3 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./dist | ||
# cname: github1s.com | ||
# keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ lib | |
dist | ||
out | ||
node_modules | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM gitpod/workspace-full | ||
|
||
RUN sudo apt-get update \ | ||
&& sudo apt-get install -y \ | ||
g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 rsync \ | ||
&& sudo rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
tasks: | ||
- init: | | ||
yarn | ||
yarn build | ||
command: | | ||
echo "=======================" | ||
echo "Please run 'yarn watch'" | ||
echo "=======================" | ||
- command: | | ||
echo "===========================================================================" | ||
echo "Please wait for 'yarn watch' to complete compilation, then run 'yarn serve'" | ||
echo "===========================================================================" | ||
ports: | ||
- port: 5000 | ||
onOpen: open-browser | ||
github: | ||
prebuilds: | ||
# enable for the master/default branch (defaults to true) | ||
master: true | ||
# enable for all branches in this repo (defaults to false) | ||
branches: true | ||
# enable for pull requests coming from this repo (defaults to true) | ||
pullRequests: true | ||
# enable for pull requests coming from forks (defaults to false) | ||
pullRequestsFromForks: true | ||
# add a check to pull requests (defaults to true) | ||
addCheck: true | ||
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false) | ||
addComment: true | ||
# add a "Review in Gitpod" button to the pull request's description (defaults to false) | ||
addBadge: false | ||
# add a label once the prebuild is ready to pull requests (defaults to false) | ||
addLabel: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
_ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,8 @@ | ||
![GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/logo.png) | ||
# github1s | ||
![Gogs1s](resources/images/logo.png) | ||
# Gogs1s | ||
|
||
One second to read GitHub code with VS Code. | ||
|
||
## Usage | ||
|
||
Just add `1s` after `github` and press `Enter` in the browser address bar for any repository you want to read. | ||
|
||
For example, try it on the VS Code repo: | ||
|
||
[https://github1s.com/microsoft/vscode](https://github1s.com/microsoft/vscode) | ||
|
||
![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vs-code-github1s.png) | ||
|
||
For browser extensions, see [Third-party Related Projects](https://github.com/conwnet/github1s#third-party-related-projects). | ||
|
||
Or save the following code snippet as a bookmarklet (GitHub markdown doesn't allow js links, so just copy it into a bookmark). | ||
|
||
``` | ||
javascript: window.location.href = window.location.href.replace('github.com', 'github1s.com') | ||
``` | ||
|
||
## Documentation | ||
|
||
- [How it works](https://github.com/conwnet/github1s/blob/master/docs/guide.md) | ||
VSCode web online preview code for gogs. | ||
|
||
## Screenshots | ||
|
||
![VS Code - GitHub1s](https://raw.githubusercontent.com/mohitjaisal/github1s/master/resources/images/Github1sDemo1.gif) | ||
|
||
![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/demo.png) | ||
|
||
## Development | ||
|
||
You need [these prerequisites (the same ones as for VS Code)](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for development. | ||
|
||
```bash | ||
$ git clone git@github.com:conwnet/github1s.git | ||
$ cd github1s | ||
$ yarn | ||
$ yarn watch | ||
$ yarn serve # in another shell | ||
$ # Then visit http://localhost:5000 or http://localhost:5000/conwnet/github1s once the build is completed. | ||
``` | ||
|
||
## Build | ||
|
||
```bash | ||
$ yarn | ||
$ yarn build | ||
``` | ||
|
||
## Third-party Related Projects | ||
|
||
### Chrome Extensions | ||
|
||
- [zulhfreelancer](https://github.com/zulhfreelancer)/[Open in VS Code](https://chrome.google.com/webstore/detail/open-in-vs-code-github1sc/neloiopjjeflfnecdlajhopdlojlkhll) | ||
|
||
- [fhefh2015/GitHub1s_chrome_extension](https://github.com/fhefh2015/GitHub1s_chrome_extension) - [Chrome Web Store](https://chrome.google.com/webstore/detail/github1s/lodjfmkfbfkpdhnhkcdcoonghhghbkhe) | ||
|
||
- [febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer) - [Chrome Web Store](https://chrome.google.com/webstore/detail/github-code-viewer/ecddapgifccgblebfibdgkagfbdagjfn) | ||
|
||
- [Darkempire78/Github1s-Extension](https://github.com/Darkempire78/Github1s-Extension) | ||
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide) - [Chrome Web Store](https://chrome.google.com/webstore/detail/adjiklnjodbiaioggfpbpkhbfcnhgkfe) | ||
- [katsuhisa91/github1s-shortcut](https://github.com/katsuhisa91/github1s-shortcut) - [Chrome Web Store](https://chrome.google.com/webstore/detail/shortcut-to-github1s/gfcdbodapcbfckbfpmgeldfkkgjknceo) | ||
|
||
### Firefox Extensions | ||
|
||
- [Darkempire78/Github1s-Extension](https://github.com/Darkempire78/Github1s-Extension) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github1s-extension) | ||
- [mcherifi/github1s-firefox-addon](https://github.com/mcherifi/github1s-firefox-addon) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github1s/) | ||
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide) - [Firefox Browser Addons](https://addons.mozilla.org/firefox/addon/github-web-ide/) | ||
|
||
|
||
### Microsoft Edge Extensions | ||
|
||
- [febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer) | ||
- [zvizvi/Github Web IDE](https://github.com/zvizvi/github-web-ide) | ||
![VS Code - Gogs1s](resources/images/4.gif) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteBase / | ||
RewriteRule ^index\.html$ - [L] | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule . /index.html [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<VirtualHost 115.28.243.165> | ||
ServerAdmin lqg@yoqi.me | ||
DocumentRoot "/home/twtech/www/code.git.yoqi.me" | ||
ServerName code.git.yoqi.me | ||
ServerAlias ide.git.yoqi.me | ||
php_admin_value open_basedir "/home/twtech/www/:/tmp/" | ||
|
||
ErrorLog "/home/twtech/www/wwwlogs/code.git.yoqi.me_error_apache.log" | ||
#CustomLog "/home/twtech/www/wwwlogs/code.git.yoqi.me_access_apache.log" common | ||
|
||
<IfModule alias_module> | ||
Alias /.well-known/acme-challenge "/home/twtech/tools/acme-tiny/challenges" | ||
<Directory /home/twtech/tools/acme-tiny/challenges> | ||
Options FollowSymLinks MultiViews | ||
AllowOverride None | ||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
</IfModule> | ||
|
||
<Directory "/home/twtech/www/code.git.yoqi.me"> | ||
SetOutputFilter DEFLATE | ||
Options FollowSymLinks ExecCGI | ||
#Require all granted | ||
AllowOverride All | ||
Order allow,deny | ||
Allow from all | ||
DirectoryIndex index.html index.php | ||
</Directory> | ||
#<Directory ~ ".*\.svn|.git|_svn/.*"> | ||
# Order allow,deny | ||
# Deny from all | ||
#</Directory> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
loation /{ | ||
try_files $uri $uri/ /index.html; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
location /api/v1 { | ||
if ($request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
# | ||
# Custom headers and headers various browsers *should* be OK with but aren't | ||
# | ||
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
# | ||
# Tell client that this pre-flight info is valid for 20 days | ||
# | ||
add_header 'Access-Control-Max-Age' 1728000; | ||
add_header 'Content-Type' 'text/plain charset=UTF-8'; | ||
add_header 'Content-Length' 0; | ||
return 204; | ||
} | ||
if ($request_method = 'POST') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
} | ||
if ($request_method = 'GET') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.