diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..522ac7c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,25 @@ +# Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +FROM mcr.microsoft.com/vscode/devcontainers/universal:linux as builder +USER root + +# Magic DNS in a container where /etc/resolv.conf is a bind mount needed +# extra support, currently on a development branch. +WORKDIR /go/src/tailscale +COPY . ./ +RUN git clone https://github.com/tailscale/tailscale.git && cd tailscale && \ + go mod download && \ + go install -mod=readonly ./cmd/tailscaled ./cmd/tailscale +COPY . ./ + +FROM mcr.microsoft.com/vscode/devcontainers/universal:linux +USER root + +RUN apt-get update && apt-get install -y curl gpg dnsutils +COPY tailscaled /etc/init.d +COPY --from=builder /go/bin/tailscaled /usr/sbin/tailscaled +COPY --from=builder /go/bin/tailscale /usr/bin/tailscale + +RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2246889 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "Tailscale-enabled Codespace", + "dockerFile": "Dockerfile", + "context": "..", + "runArgs": [ "--cap-add=NET_ADMIN", "--cap-add=NET_RAW", "--device=/dev/net/tun" ], + "postStartCommand": "/etc/init.d/tailscaled start", +} diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml index 176d692..dfb6d9b 100644 --- a/.github/workflows/action.yaml +++ b/.github/workflows/action.yaml @@ -5,50 +5,49 @@ name: Generate Snake # Controls when the action will run. This action runs every 6 hours. on: - schedule: - # every 6 hours - - cron: "0 */3 * * *" + schedule: + # every 6 hours + - cron: "0 */3 * * *" -# This command allows us to run the Action automatically from the Actions tab. - workflow_dispatch: + # This command allows us to run the Action automatically from the Actions tab. + workflow_dispatch: # The sequence of runs in this workflow: jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - # Checks repo under $GITHUB_WORKSHOP, so your job can access it - - uses: actions/checkout@v2 - - # Generates the snake - - uses: Platane/snk@master - id: snake-gif - with: - github_user_name: mishmanners - # these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up. - gif_out_path: dist/github-contribution-grid-snake.gif - svg_out_path: dist/github-contribution-grid-snake.svg - - # show the status of the build. Makes it easier for debugging (if there's any issues). - - run: git status - - # Push the changes - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master - force: true - - - uses: crazy-max/ghaction-github-pages@v2.1.3 - with: - # the output branch we mentioned above - target_branch: output - build_dir: dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks repo under $GITHUB_WORKSHOP, so your job can access it + - uses: actions/checkout@main + + # Generates the snake + - uses: Platane/snk@main + id: snake-gif + with: + github_user_name: nooobcoder + # these next 2 lines generate the files on a branch called "output". This keeps the main branch from cluttering up. + gif_out_path: github-contribution-grid-snake.gif + svg_out_path: github-contribution-grid-snake.svg + + # show the status of the build. Makes it easier for debugging (if there's any issues). + - run: git status + + # Push the changes + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + force: true + + - uses: crazy-max/ghaction-github-pages@v2.1.3 + with: + # the output branch we mentioned above + target_branch: output + build_dir: dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/devcard.yaml b/.github/workflows/devcard.yaml new file mode 100644 index 0000000..7d4e9a6 --- /dev/null +++ b/.github/workflows/devcard.yaml @@ -0,0 +1,21 @@ +# Name of the github action +name: devcard_nooobcoder +permissions: + contents: write + +on: + workflow_dispatch: + push: + branches: + - master + schedule: + - cron: '0 0/3 * * *' + +jobs: + devcard_nooobcoder: + runs-on: ubuntu-latest + steps: + - name: gendevcard + uses: dailydotdev/action-devcard@2.0.2 + with: + devcard_id: ${{ secrets.DEVCARD_ID }} diff --git a/.github/workflows/wakastats.yaml b/.github/workflows/wakastats.yaml new file mode 100644 index 0000000..349f7dc --- /dev/null +++ b/.github/workflows/wakastats.yaml @@ -0,0 +1,18 @@ +name: Waka Readme + +on: + schedule: + # Runs at 12am IST + - cron: "30 18 * * *" + workflow_dispatch: +jobs: + update-readme: + name: Update Readme with Metrics + runs-on: ubuntu-latest + steps: + - uses: anmol098/waka-readme-stats@master + with: + WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + LOCALE: "False" + SYMBOL_VERSION: 2 diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..136098e --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,28 @@ +# Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +FROM gitpod/workspace-full:latest + +USER root + +RUN curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - \ + && curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list \ + && apt-get update \ + && apt-get install -y tailscale +RUN sh -c "$(curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg)" +RUN sh -c "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null" +RUN bash -c "sudo apt update" +RUN bash -c "sudo apt install gh -y" +USER gitpod +RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +ENV SHELL=zsh +RUN echo "alias gits='git status'" >> $HOME/.zshrc +RUN echo "alias ls='ls -GFh'" >> $HOME/.zshrc +ENV NVM_DIR="$HOME/.nvm" +RUN echo ". ~/.nvm/nvm.sh" >> $HOME/.zshrc +RUN sed -i 's/plugins=(git)/plugins=(git npm docker-compose docker)/' $HOME/.zshrc +RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k +RUN sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' $HOME/.zshrc +RUN wget https://gist.githubusercontent.com/nooobcoder/d8f728b999329c4edf563cd378d0398c/raw/.p10k.zsh -O $HOME/.p10k.zsh +RUN echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> $HOME/.zshrc diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..bc68874 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,134 @@ +image: + file: .gitpod.Dockerfile +tasks: + - name: tailscaled + command: | + if [ -n "${TS_STATE_TAILSCALE_EXAMPLE}" ]; then + # restore the tailscale state from gitpod user's env vars + sudo mkdir -p /var/lib/tailscale + echo "${TS_STATE_TAILSCALE_EXAMPLE}" | sudo tee /var/lib/tailscale/tailscaled.state > /dev/null + fi + sudo tailscaled + - name: Tailscale + command: | + sudo -E tailscale up --hostname "gitpod@nooobcoder-${GITPOD_WORKSPACE_ID}" \ + --authkey "${TAILSCALE_AUTHKEY}" + - name: ImportGPG + command: > + [[ ! -z $GNUPG_KEY ]] && + gpg --verbose --batch --import <(echo $GNUPG_KEY|base64 -d) && + echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf && + git config commit.gpgsign true +vscode: + extensions: + - mutantdino.resourcemonitor + - cweijan.vscode-mysql-client2 + - Gruntfuggly.todo-tree + - jsDelivr.jsdelivr + - manuth.eslint-language-service + - markwylde.vscode-filesize + - mongodb.mongodb-vscode + - monokai.theme-monokai-pro-vscode + - ngryman.codesandbox-theme + - njzy.stats-bar + - pflannery.vscode-versionlens + - rangav.vscode-thunder-client + - redwan-hossain.auto-rename-tag-clone + - tombonnike.vscode-status-bar-format-toggle + - vlanguage.vscode-vlang + - vscjava.vscode-spring-initializr + - zaaack.markdown-editor + - aaron-bond.better-comments + - ahmadawais.shades-of-purple + - apollographql.vscode-apollo + - avraammavridis.vsc-react-documentation + - bengreenier.vscode-node-readme + - benjaminbenais.codesandbox-dark + - bierner.color-info + - bradlc.vscode-tailwindcss + - bungcip.better-toml + - chris-noring.node-snippets + - christian-kohler.npm-intellisense + - christian-kohler.path-intellisense + - chrmarti.regex + - CodeSandbox-io.codesandbox-projects + - CodeSandbox-io.codesandbox-projects-theme + - cssho.vscode-svgviewer + - DaltonMenezes.aura-theme + - Dart-Code.dart-code + - Dart-Code.flutter + - dbaeumer.vscode-eslint + - docsmsft.docs-markdown + - docsmsft.docs-preview + - DominicVonk.parameter-hints + - dsznajder.es7-react-js-snippets + - eamodio.gitlens + - ecmel.vscode-html-css + - EditorConfig.EditorConfig + - eg2.vscode-npm-script + - esbenp.prettier-vscode + - evan-buss.font-switcher + - formulahendry.auto-rename-tag + - geeebe.duplicate + - GitHub.codespaces + - GitHub.copilot-labs + - GitHub.copilot-nightly + - GitHub.github-vscode-theme + - GitHub.vscode-pull-request-github + - gitpod.gitpod-desktop + - golang.go + - GraphQL.vscode-graphql + - hashicorp.terraform + - hollowtree.vue-snippets + - jcbuisson.vue + - jeff-hykin.better-cpp-syntax + - k--kato.intellij-idea-keybindings + - me-dutour-mathieu.vscode-github-actions + - mechatroner.rainbow-csv + - mikestead.dotenv + - ms-python.python + - ms-python.vscode-pylance + - ms-toolsai.jupyter + - ms-toolsai.jupyter-keymap + - ms-vscode-remote.remote-containers + - ms-vscode-remote.remote-ssh + - ms-vscode-remote.remote-ssh-edit + - ms-vscode-remote.remote-wsl + - ms-vscode-remote.vscode-remote-extensionpack + - ms-vscode.cmake-tools + - ms-vscode.cpptools + - ms-vscode.cpptools-extension-pack + - ms-vscode.cpptools-themes + - ms-vscode.js-debug-nightly + - ms-vscode.vscode-typescript-next + - ms-vscode.vscode-typescript-tslint-plugin + - ms-vsliveshare.vsliveshare + - ms-vsliveshare.vsliveshare-audio + - ms-vsliveshare.vsliveshare-pack + - naumovs.color-highlight + - oderwat.indent-rainbow + - PKief.material-icon-theme + - pranaygp.vscode-css-peek + - Prisma.prisma + - Prisma.prisma-insider + - redhat.java + - redhat.vscode-xml + - redhat.vscode-yaml + - ritwickdey.LiveServer + - sdras.night-owl + - silvenon.mdx + - steoates.autoimport + - tgreen7.vs-code-node-require + - tomoki1207.selectline-statusbar + - twxs.cmake + - usernamehw.errorlens + - VisualStudioExptTeam.vscodeintellicode + - vscjava.vscode-java-debug + - vscjava.vscode-java-dependency + - vscjava.vscode-java-pack + - vscjava.vscode-java-test + - vscjava.vscode-maven + - vscode-icons-team.vscode-icons + - wix.vscode-import-cost + - xabikos.JavaScriptSnippets + - Zignd.html-css-class-completion diff --git a/README.md b/README.md index 0b55bf0..b5c09fe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -[]() +