Skip to content

Instantly share code, notes, and snippets.

Created February 17, 2022 14:54
What would you like to do?
the github repository here
import time
import random
import string
#generate random number, that will declare how many letters
#will be added to the text.txt file. Each time we change the text.txt file
#we can made a commit and push it to the reote repo
#which will be considered as a github contribution
x = random.randrange(10)
random_letter = random.choices(string.ascii_letters,k=x)
#function which actually adding those letters t the text.txt file
def random_letter_write(letters):
streng = ""
for l in letters:
streng += l
#opening the text.txt file, but if it doesn't exist, it will be created,
#this is why were using a+ attribute
with open("text.txt",'a+') as f:
return "all went good"
return "all bad"
#! /bin/sh
#running the python script first
#it will generate letters, add those letters to the file text.txt
#file gonna change and git will see those changes
#executing classic git commands
#and since we have added and bind ssh key to the VPS system
#we can automatically upload git changes to the remote repo
#without any logins or passwords
git add .
git commit -m "autogenerated by script"
git push --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment