Skip to content

Instantly share code, notes, and snippets.

View wise-bit's full-sized avatar
:shipit:
🤨

satrajit chatterjee (sat) wise-bit

:shipit:
🤨
View GitHub Profile
@wise-bit
wise-bit / vignere.py
Created August 21, 2023 05:48
Vignere encode and decode
import sys
m = sys.argv[1]
s = sys.argv[2]
key = "wordle"
if m == "e":
print("".join([ chr(((ord(x) - 97) + (ord(key[i % 6]) - 97)) % 26 + 97) for i, x in enumerate(s)]))
elif m == "d":
@wise-bit
wise-bit / yt.py
Created August 19, 2023 05:06
yt_downloader
# python3 -m pip install git+https://github.com/pytube/pytube
import sys
from pytube import YouTube, Playlist
if __name__ == "__main__":
path = "./files"
if len(sys.argv) < 2:
link = input("Enter link of video or playlist: ")
else:
@wise-bit
wise-bit / eat.py
Created April 25, 2023 07:15
beeper
import winsound
import keyboard
import time
try:
tick = time.time() - 59
count = 0
while True:
if time.time() - tick >= 60:
@wise-bit
wise-bit / existing-folder-git-repo.txt
Last active May 19, 2022 02:12
Add existing folder to git
git init
git add -A
git commit -m "Added initial project files"
git branch -M main
git remote add origin [email protected]:user/new-project.git
git push -u -f origin main
# if required:
git pull origin main --allow-unrelated-histories
@wise-bit
wise-bit / clicker.py
Last active May 12, 2022 23:06
Autoclicker
import pyautogui
TOTAL_CLICKS = 10000
pyautogui.PAUSE = 0.045
for i in range(TOTAL_CLICKS):
pyautogui.click()
@wise-bit
wise-bit / wiggle.py
Last active April 25, 2022 06:50
Mouse wiggler
import pyautogui
# Wiggles starting from the location of mouse when executing
click = True
while True:
pyautogui.moveRel(0, 50, duration=1)
if click:
pyautogui.click()
pyautogui.moveRel(0, -50, duration=1)
if click:
@wise-bit
wise-bit / parrot.bat
Created April 25, 2022 06:45
Terminal parrot batch
@echo off
curl parrot.live
@echo on
'''
Description
---------------------------------------
Substitution encryption algorithm to demonstrate the enigma cipher using
code-golf coding strategies to write the program.
Supports:
---------------------------------------
(i) Generating keys
(ii) Encryption
@wise-bit
wise-bit / movingRepo.txt
Created January 9, 2019 04:50
Copy repo from bitbucket to github
cd path/to/directory
git remote rename origin bitbucket
git remote add origin https://github.com/username/repositoryname.git
git push origin master
git remote rm bitbucket
@wise-bit
wise-bit / removetitlebar.txt
Created January 9, 2019 04:46
Remove title bar from JFrame
// JAVA code
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Already there
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setUndecorated(true);