A Go script that makes your GitHub contribution activity panel look awesome! Display a message !

GitHub contributions generator

A script written in Go, which goal is to make your GitHub contributions graph the way you want it to be. :shipit: The goal of this was to improve my Go skills and to have some fun! Enjoy! 🍻

What's the goal?

Let't transform this original-github

to something more interesting

bamboozled_med

Disclaimer

This script was written for fun. In no way is it meant to "cheat". Nobody should judge a programmer regarding to his GitHub contributions graph. It's still not perfect. If you will use the nonrandom (message) option, there can be some distorted letters.

System requirements

This script is written in Go, so you will need it. And ofcourse you will need git.

How to run the nonrandom option (displaying a message)

  1. Create an fully empty GitHub repository (not even a README). Do not initialize it.
  2. Example of a command:
go run . nonrandom -message="HelloWorld" -repository="https://github.com/yourUserName/yourRepo.git" -adjust_date=-3 -saturation=medium

Note the adjust_date parameter. It's a important one. More about it below.

helloworld_high

The adjust_date parameter

If you want to display a message, you will have to check if the current date and the 1st date displayed in the GitHub contributions graph are the same. I have no idea how the graph works, but usually the first "box" (top left corner) is a few days behind the current date.

dateExxample

In the example above we see that there is a 3 day difference between todays date and the first GitHub date. So we have to let the script know that it has to start 3 days earlier. So we use the -adjust_date=-3 flag.

If you don't pay attention to this, the script will start contributing exactly 1 year ago from today, and this will happen: no_date_adjustment_example

The saturation parameter (filling the background when displaying a message)

If you don't specify a background saturation level, the script will just write the message with no background. That can be a problem if you have commits from before as the squares will "collide" with the letters and make them unreadable. Example with no saturation parameter provided:

go run . nonrandom -message="sad->" -repository="https://github.com/yourUserName/yourRepo.git" -adjust_date=-3

no_background

low, medium, high background saturation. Which one to use?

It all depends on your GitHub contributions graph. If you have been very active, and made a lot of commits you will have to use the high option, you will fill out the backround to a level that will make your message readable.

If you don't have a lot of commits you can go with the low or medium option. Take in to account that the high saturation option takes the most time to complete.

This is an example of a medium saturated background: barcelona_github

Paremeters

Flag Name Type Required Default Description
repository String true Enter a link to an empty non-initialized GitHub repository to which you want to push the generated file. The link can be an SSH (assuming you have an ssh key) or the HTTPS format. (e.g., [email protected]:yourusername/yourrepo.git or https://github.com/yourusername/yourrepo.git)
saturation String false none The ammount of background saturation. Options are: low, medium and high. You should choose the option on behalf of your current GitHub contributions panel. If you have very little contributions choose the low option. If you have been very active, you will need to choose high in order for the text to be readable/visible. If you don't define the saturation, it won't be set.
adjust_date Integer false 0 Adjust the date difference between the current date and the first date displayed in the GitHub contributions panel. E.g, toda is the 8th of March, but GitHubs panel is still one day behind(7th of March). So you enter -1 to change todays date to the one displayed on the panel.")
message String true hello Enter the message you would like to be displayed on the contribution graph. The maximum ammount of characters is 10.

How the letters work

Each letter/symbol/number is displayed in a 7x5 matrix. The GitHub contributions panel has space for 10 of those matrices.
If you want to use a specific letter/symbol/number in your github message, you will have to check in the charMatrix.go folder and see if's already defined. Currently there are a few symbols and all the lower case letter. But don't worry. You can define other letters/numbers/symbols. Just define your symbol in a new matrix and add it to the alphabet variable. I've used this font to draw the letters: pixel_fonts

How to run the random option

  1. Create an fully empty GitHub repository (not even a README). Do not initialize it.
  2. For the basic option (contribute the entire year), you run the command:
go run . random -repository="https://github.com/yourUserName/yourRepo.git"

Because it has to commit for each day of the year, this can take a few minutes to complete.
Note: After the script finishes, you have to wait for GitHub to register and show the changes.

Contributions graph before running the command above

original_commit_graph

Contributions graph after committing on nearly each day of the yeah(depengind on the frequency parameter).

graph after random script

Note: The default maximum value of commits in the example above was 7 per day. The script made a contribution 85% of days in a year.

The month parameter

If you want your graph to look like you've made a lot of contributions in a specific month, you can do it like this:

go run . random -repository="https://github.com/yourUserName/yourRepo.git" -month=3-4 -frequency=96 -commit_limit=15

graphh specific month 3-4 Lets say the current date is 25th of february. The command above will start making contributions from the 25 of march for 61 days (because the we specified -month=3-4 from march-april). And because we are nearly at the end of march the cript will continue past april, untill it commits the sum of days the entered months have.

You can also make different combinations. Just make another repository and run another command. E.g, you could run the default command whitch would post for the entire year, and then just make another empty repository and make more posts in a specific time, so it would look like you did something the entire year, but you were really productive at a specific time.

Paremeters

Flag Name Type Required Default Description
repository String true Enter a link to an empty non-initialized GitHub repository to which you want to push the generated file. The link can be an SSH (assuming you have an ssh key) or the HTTPS format. (e.g., [email protected]:yourusername/yourrepo.git or https://github.com/yourusername/yourrepo.git)
commit_limit Integer false 7 Set the limit(n) of commits per single day. The script will randomly commit from 1 to n times a day. The maximum is 15 and the minimum is 1.
frequency Integer false 75 The procentage of days out of 365 you would like to contribute. E.g., if you enter 20, you will contribute 73 days out of 1 year.
month String false 1-12 Contribute only in a specific period. If you enter 3-5, you will only commit from march(starting the same day of month as today) to may. Entering only one number like 8(october) will prompt the script to commit only on the specified month.

Note that GitHubs contribution time frame is current date minus one year. So if our current month is february and you enter the flag -month=1-3, it won't contribute from january to march. It will contribute from february to april, because the 1st month in contributions panel is the current month.

Costumizations

You can do a lot of custom "stuff" here. You can run the random and the nonrandom option seperately to get more specific results. All you need to do it make a new repository on GitHub for each time you run the script. E.g, You run the random command with specific instructions and then just make another repository and run another version of the script there.

If you dont like a specific result, you can just delete the repository and the commits will be removed.

Having problems?

Keep in mind that it can take GitHub several minutes to update the changes. Still no luck?

Ok sooooo, what could of went wront. Imma be honest here. I did not test this enough. But if you execute the script and it finishes, and there is still no change on the GitHub page, you will have to check your repository and see if there is a file named data.txt with a lot of commits. If you can't find it, you will have to make sure that you are logged in into the right GitHub account and that you have all the permissions to push to the repo. There is no error handling in this script (yet). I would recommend to just pushing a random file from the git bash. If it works, the script should work too.

Owner
Aliash
"Well, the program works for most cases. I didn't know it had to work for that case."
Aliash
Similar Resources

A simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app to Docker Hub

go-pipeline-demo A repository containing a simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app t

Nov 17, 2021

Go-github-app - Template for building GitHub Apps in Go.

Template for GitHub Apps built with Golang Blog Posts - More Information About This Repo You can find more information about this project/repository a

Dec 25, 2022

Clones github projects into ~/Projects/github/{org}/{repo}

Tidy clone Github cli extension (gh extension) to clone repos into ~/Projects/github/{org}/{repo} on the local filesystem Install gh extension install

Jan 19, 2022

Github billing exporter - Billing exporter for GitHub organizations

GitHub billing exporter Forked From: https://github.com/borisputerka/github_bill

Nov 2, 2022

Github-language-trends - Github trending languages API

Github trending languages API This API provides list of most popular github lang

Feb 15, 2022

The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network training on Kubernetes

DGL Operator The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network distributed or non-distributed training on Kubernetes

Dec 19, 2022

The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022

moreHandlers is a library which makes possible the use of multiple handlers for the MCBE server software

moreHandlers moreHandlers is a library which makes possible the use of multiple handlers for the MCBE server software https://github.com/df-mc/dragonf

Aug 4, 2022

A proof-of-concept project that makes accessible buildkitd daemon from macOS

buildkit-machine buildkit-machine allows you to make buildkitd daemon accessible in your macOS environment. To do so, it uses lima, which is a Linux s

Dec 21, 2022
MenuStart plugin to nwg-panel, also capable of working standalone
MenuStart plugin to nwg-panel, also capable of working standalone

nwg-menu This code provides the MenuStart plugin to nwg-panel. It also may be used standalone, however, with a little help from command line arguments

Sep 9, 2022
Simple golang script for getting VK message statistics

vk-message-counter Simple golang script for getting VK message statistics Example package main import ( "fmt" "github.com/joho/godotenv" counter "

Apr 6, 2022
Kusk makes your OpenAPI definition the source of truth for API resources in your cluster
Kusk makes your OpenAPI definition the source of truth for API resources in your cluster

Kusk - use OpenAPI to configure Kubernetes What is Kusk? Developers deploying their REST APIs in Kubernetes shouldn't have to worry about managing res

Dec 16, 2022
Go-github-actions - `go-github-actions` is a package for developing GitHub Actions

go-github-actions go-github-actions is a package for developing GitHub Actions.

Feb 6, 2022
A curated list of awesome Kubernetes tools and resources.

Awesome Kubernetes Resources A curated list of awesome Kubernetes tools and resources. Inspired by awesome list and donnemartin/awesome-aws. The Fiery

Jan 2, 2023
Awesome-italia-remote - A list of remote-friendly or full-remote companies that targets Italian talents

Awesome Italia Remote A list of remote-friendly or full-remote companies that ta

Dec 29, 2022
Ostent is a server tool to collect, display and report system metrics.
Ostent is a server tool to collect, display and report system metrics.

Ostent Ostent collects metrics to display and report to InfluxDB, Graphite, Librato. The interactive display UI (demo): System metrics collected and r

Sep 27, 2022
Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

Display (Namespace, Pod, Container, Primary PID) from a host PID, fails if the target process is running on host

Oct 17, 2022
kubernetes Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request and Limit.
kubernetes Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request and Limit.

kubectl resource-view A plugin to access Kubernetes resource requests, limits, and usage. Display Resource (CPU/Memory/Gpu/PodCount) Usage and Request

Apr 22, 2022
GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.
GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

GitOops is a tool to help attackers and defenders identify lateral movement and privilege escalation paths in GitHub organizations by abusing CI/CD pipelines and GitHub access controls.

Jan 2, 2023