|
1 | | -# Cloud DevOps: <br> Learning Path - Overview |
| 1 | +# Open Source Visitor Counter |
2 | 2 |
|
3 | 3 | Costa Rica |
4 | 4 |
|
| 5 | +[](https://github.com) |
5 | 6 | [](https://github.com/) |
6 | 7 | [brown9804](https://github.com/brown9804) |
7 | 8 |
|
8 | | -Last updated: 2024-12-13 |
| 9 | +Last updated: 2025-07-10 |
9 | 10 |
|
10 | 11 | ---------- |
11 | 12 |
|
12 | | -> Provides the essential knowledge required to work effectively within Azure and embrace DevOps/Agile methodologies. Additionally, it offers insights into fundamental cloud concepts. |
13 | | -
|
14 | | -<details> |
15 | | -<summary><b>Table of Contents</b> (Click to expand)</summary> |
16 | | - |
17 | | -- [Agile](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/Agile) |
18 | | -- [DevOps](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/DevOps) |
19 | | -- [Network](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/Network) |
20 | | -- [GitHub](https://github.com/brown9804/CloudDevOps_LPath/tree/main/GitHub) |
21 | | -- [Cloud Principles](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/Cloud) |
22 | | - - [0. Linux](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux) |
23 | | - - [Working with Users and Permissions](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab0) |
24 | | - - [System Service Management, Runlevels and Boot Targets](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab1) |
25 | | - - [Securely Accessing Your System](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab2) |
26 | | - - [Package Management and Troubleshooting](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab3) |
27 | | - - [File Management, Permissions and Backup](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab4) |
28 | | - - [Working with Text Files and Streams](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab5) |
29 | | - - [Linux Device Management](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab6) |
30 | | - - [The Linux Shell](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab7) |
31 | | - - [Networking](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab8) |
32 | | - - [Processes Management](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/0-linux/lab9) |
33 | | - - [1. Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform) |
34 | | - - [Installing Terraform and Working with Terraform Providers](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab0) |
35 | | - - [Using Terraform CLI Commands (workspace and state) to Manipulate a Terraform Deployment](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab1) |
36 | | - - [Building and Testing a Basic Terraform Module](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab2) |
37 | | - - [Exploring Terraform State Functionality](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab3) |
38 | | - - [Deploy an Azure Storage Account with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab4) |
39 | | - - [Deploy an Azure File Share and Blob Storage with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab5) |
40 | | - - [Deploy Azure VNETs and Subnets with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab6) |
41 | | - - [Create Azure NSGs with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab7) |
42 | | - - [Deploying an Azure VM with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab8) |
43 | | - - [Deploy a Web Application with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab9) |
44 | | - - [Deploy a MySQL Database with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_10) |
45 | | - - [Migrating Terraform State to Terraform Cloud](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_11) |
46 | | - - [Using Terraform Provisioners to Set Up an Apache Web Server on AWS](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_12) |
47 | | - - [Make Changes to AWS Infrastructure Using Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_13) |
48 | | - - [Use Output Variables to Query Data in AWS Using Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_14) |
49 | | - - [Make Changes to Azure Infrastructure Using Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_15) |
50 | | - - [Use Output Variables to Query Data in Azure Using Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_16) |
51 | | - - [Use Terraform to Create a Kubernetes Deployment](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_17) |
52 | | - - [Manage Kubernetes Resources with Terraform](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_18) |
53 | | - - [Use Terraform to Create an EKS Deployment](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_19) |
54 | | - - [Troubleshooting a Terraform Deployment](https://github.com/brown9804/DevOps-Agile-Cloud_path/tree/main/Cloud/1-terraform/lab_20) |
55 | | - |
56 | | - - [Automation Principles](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/Cloud/2-automation_principles) |
57 | | - - [Kubernetes Principles](https://github.com/brown9804/SDLC-Cloud_Lpath/tree/main/Cloud/3-kubernetes_principles) |
58 | | - |
59 | | -</details> |
60 | | - |
61 | | -## Overview |
62 | | - |
63 | | -- SDLC - [What is and how it works](https://agilie.com/blog/what-is-the-software-development-life-cycle-sdlc-and-how-does-it-work) |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | -- SDLC - [Methodologies](https://datarob.com/sdlc-methodologies/) |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
| 13 | +> This repository provides a customizable GitHub visitor counter that tracks and displays the number of visits to your GitHub profile or repository. The counter updates daily using the GitHub Traffic API and writes the total views directly into the README file. |
| 14 | +
|
| 15 | +## Features |
| 16 | + |
| 17 | +- **Daily-updated visitor counting**: Fetches real visitor data from the GitHub Traffic API. |
| 18 | +- **Markdown-based display**: Updates the README file with the total visitor count. |
| 19 | +- **Open source and customizable**. |
| 20 | + |
| 21 | +## How it works |
| 22 | + |
| 23 | +> [!IMPORTANT] |
| 24 | +> This counter is updated once per day (not real-time) and shows the total number of visits (including repeat visits) as reported by GitHub. |
| 25 | +
|
| 26 | +- A GitHub Action workflow runs daily to fetch visitor data from the GitHub Traffic API. |
| 27 | +- The action updates the `README.md` file with the total visitor count and the refresh timestamp. |
| 28 | + |
| 29 | +## How to use it |
| 30 | + |
| 31 | +1. **Add the Badge to Your Repository**: Include the following markdown in your `README.md` file, between the `START BADGE` and `END BADGE` (included), as shown in the bottom. |
| 32 | +2. **Create a Personal Access Token**: |
| 33 | + - Go to **GitHub Settings** > **Developer Settings** > **Personal Access Tokens**. |
| 34 | + - Generate a new token with `repo` access. |
| 35 | +3. **Save the Token as a Secret**: |
| 36 | + - In your repository, navigate to **Settings** > **Secrets and Variables** > **Actions**. |
| 37 | + - Add a new secret named `TRAFFIC_TOKEN` and paste the generated token. |
| 38 | +4. **Add the Pipeline**: This single pipeline will fetch the visitor count, update the badge in the `README.md` file, and push the changes back to the repository. |
| 39 | + - Create a GitHub Actions workflow (`update-metrics.yml`) in your repository to handle the visitor counter logic. |
| 40 | + - Use the following content for the workflow: |
| 41 | + |
| 42 | + ```yaml |
| 43 | + name: Update Visitor Counter |
| 44 | + |
| 45 | + on: |
| 46 | + schedule: |
| 47 | + - cron: '0 0 * * *' # Runs daily at midnight |
| 48 | + workflow_dispatch: # Allows manual triggering |
| 49 | + |
| 50 | + jobs: |
| 51 | + update-counter: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + |
| 54 | + steps: |
| 55 | + - name: Checkout repository |
| 56 | + uses: actions/checkout@v3 |
| 57 | + |
| 58 | + - name: Set up Node.js |
| 59 | + uses: actions/setup-node@v3 |
| 60 | + with: |
| 61 | + node-version: '16' |
| 62 | + |
| 63 | + - name: Install dependencies |
| 64 | + run: npm install @brown9804/github-visitor-counter |
| 65 | + |
| 66 | + - name: Run visitor counter script |
| 67 | + run: node node_modules/@brown9804/github-visitor-counter/update_repo_views_counter.js |
| 68 | + env: |
| 69 | + TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }} |
| 70 | + REPO: ${{ github.repository }} |
| 71 | + |
| 72 | + - name: Commit and push changes |
| 73 | + run: | |
| 74 | + git config --global user.name "github-actions[bot]" |
| 75 | + git config --global user.email "github-actions[bot]@users.noreply.github.com" |
| 76 | + git add README.md metrics.json |
| 77 | + git commit -m "Update visitor count" |
| 78 | + git push |
| 79 | + ``` |
| 80 | +
|
| 81 | +## Files structure |
| 82 | +
|
| 83 | +- `README.md`: Contains instructions and displays the visitor count badge. |
| 84 | +- `update_repo_views_counter.js`: Script to fetch visitor count data from the GitHub Traffic API and update the `README.md` file. |
| 85 | +- `package.json`: Defines dependencies and scripts for the project. |
| 86 | +- `LICENSE`: Specifies the license for the project. |
| 87 | + |
| 88 | +> [!IMPORTANT] |
| 89 | +> |
| 90 | +> - Replace `<main-repo-owner>` and `<main-repo-name>` with your actual values. |
| 91 | +> - Use a Personal Access Token (PAT) with `repo` access as `TRAFFIC_TOKEN` secret in each target repository. |
| 92 | +> - The action will trigger the visitor counter logic in the main repository and update the badge dynamically. |
| 93 | + |
| 94 | +<!-- START BADGE --> |
76 | 95 | <div align="center"> |
77 | | - <h3 style="color: #4CAF50;">Total Visitors</h3> |
78 | | - <img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/> |
| 96 | + <img src="https://img.shields.io/badge/Total%20views-195-limegreen" alt="Total views"> |
| 97 | + <p>Refresh Date: 2025-07-10</p> |
79 | 98 | </div> |
| 99 | +<!-- END BADGE --> |
0 commit comments