View main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from requests import get | |
x = get("https://api.contributed.jdocklabs.co.uk/user/imhemish") | |
y = json.loads(x.text) | |
print("# Accepted pull requests at GitHub") |
View mp3-tag.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from pydownsongs import get_meta, add_meta | |
from sys import argv | |
args = argv[1:] | |
for item in args: | |
add_meta(get_meta(item), item) |
View gofile.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upload files to gofile using their api | |
import requests | |
import json | |
import sys | |
filename = (sys.argv)[1] # You need to pass the path of file as arguement | |
getserver = "https://apiv2.gofile.io/getServer" | |
temp = requests.get(getserver) | |
myfiles = {'file': open(filename ,'rb')} | |
server = (json.loads(temp.text))["data"]["server"] | |
url = "https://"+server+".gofile.io/uploadFile" |
View win10-toggle-theme.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python3 | |
# Double click this file to change app mode theme in Windows 10 | |
# Dark theme is 0 and light theme is 1 | |
import os | |
import subprocess | |
themecolour = int(os.popen("reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme").read().rstrip()[-1]) | |
changedtheme = str(int(not bool(themecolour))) | |
command = ['reg.exe', 'add', 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize', | |
'/v', 'AppsUseLightTheme', '/t', 'REG_DWORD', '/d', changedtheme, '/f'] | |
subprocess.call(command) |
View mintxfce20.1configure.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is meant to debloat and configure Linux Mint XFCE 20.1 according to my needs and should not be used on any other edition or distro | |
echo Please connect to Internet first and press enter | |
read enter | |
echo Installing python3-pip, python3-tk, tk tcl, python3-setuptools and git | |
sudo apt install python3-pip python3-tk tk tcl python3-setuptools git --no-install-recommends | |
echo Removing mint welcome | |
sudo apt autoremove --purge mintwelcome -y | |
echo Removing celluloid, mpv and installing totem aka gnome-videos | |
sudo apt autoremove --purge celluloid mpv -y | |
sudo apt install totem -y |
View debianchrome.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script downloads and installs Chrome on Debian based distros | |
echo Please connect to internet first and press enter | |
read enter | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo apt install ./google-chrome-stable_current_amd64.deb --install-recommends -y |
View ytvlc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Play videos from youtube in vlc | |
# Make sure that vlc is on path | |
import requests # pip install requests | |
import random | |
import os | |
import googlesearch # pip install google | |
try: | |
def gSearch(term): | |
searchreq = list(googlesearch.search(term, stop=10, num=10, user_agent=(str(randomUsrAgent())))) |
View save.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['textdata'])) | |
{ | |
$data=$_POST['textdata']; | |
$fp = fopen('data.txt', 'a'); | |
fwrite($fp, $data); | |
fclose($fp); | |
} |
View renameTitleCase.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace mp3 with whatever files you want to rename to title case | |
# Original: this is a gist | |
# After rename: This Is A Gist | |
import os | |
listing = os.listdir() | |
filtered = [] | |
work = [] | |
for item in listing: | |
if ".mp3" in item: | |
filtered.append(item) |
View fileListing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
listing = os.listdir() | |
filtered = [] | |
for item in listing: | |
if ".mp3" in item: | |
tempdata = item.split(".mp3") # Can use any other file than .mp3 | |
requireditem = tempdata[0] | |
filtered.append(requireditem) | |
with open("current.txt", "w") as file: |