Skip to content

Instantly share code, notes, and snippets.

@97997
97997 / x360ce.ini
Created April 16, 2017 03:08
A x360ce configuration file containing some of my most used controllers,. 4 players multiplayer gaming session
; Pad 1 is Logitech F710 = PAD1=IG_c4b922303f7c11e58001444553540000
; Pad 2 is CX-506 (The white chinese wireless controller) = PAD2=IG_f608bf20b31d11e58002444553540000
; Pad 3 is Acteck 3600 = PAD3=IG_a7cb5c601c1d11e58002444553540000
; Pad 4 is Twin USB Joystick (USB Converter from PS2) = PAD4=IG_8438ed10299411e58001444553540000
; The filename should be x360ce.ini
; This file is used as config for x360ce 3.2.8.77 32bits and requires xinput1_3.dll to be present to load correctly
[Options]
UseInitBeep=1
Log=0
@97997
97997 / randomGame.py
Created April 16, 2023 20:26
Given a list of games with their launch URL command asks the user if it wants to play a random game
#Example of list.txt file
'''
Deathsmiles@@steam://rungameid/314180
Mushihimesama@@steam://rungameid/377860
Playnite Game@@playnite://playnite/start/6108f780-32bf-46c8-8db5-7aa626cfbfdf
'''
import webbrowser
import random
while True:
@97997
97997 / randomMusicAlbum.py
Created April 11, 2023 10:30
This script will open a random folder within a list of folders and will load said folder into the music player
# This script will open a random folder within a list of folders and will load said folder into the music player
# You need to set up the variables "music_player_executable" and "music_folders"
import os
import random
import subprocess
def open_random_folder(folder_path):
# Get a list of all the folders in the given path
@97997
97997 / batchmp4tomp3v0.py
Created July 17, 2022 15:00
#script takes working directory mp4 files (and others) (only tested with mp4) and uses ffmpeg to convert to variable bitrate mp3 files
#script takes working directory mp4 files (and others) (only tested with mp4) and uses ffmpeg to convert to variable bitrate mp3 files
workingDirectory = 'C:\\directory_with_the_mp4_files\\'
files = []
import os
for individualFile in os.listdir(workingDirectory):
totalpath = workingDirectory + individualFile
if individualFile.endswith(('.mp4', '.wmv', '.avi', '.mkv')):
files.append(totalpath)
for item in files:
os.system("ffmpeg -i \"" + item + "\" -q:a 0 -map a \"" + item.rsplit('.', 1)[0] + '\".mp3')
@97997
97997 / main.py
Created October 31, 2021 13:00
uptime and ip monitoring
from os import system, name
from time import sleep
from requests import get
from tkinter import messagebox
# TODO Guardar variable a un archivo, checar el archivo frecuentemente, si se detecta un cambio de ip, enviar email
def render():
# ctypes required for using GetTickCount64()
import ctypes
#Makes a trim of video using fmmpeg
import os
import tkinter as tk
from tkinter import filedialog
def filePick():
root = tk.Tk()
root.withdraw()
@97997
97997 / main.js
Created January 4, 2021 23:29
872688659\js\main.js
var symbolSize = 20;
var streams = [];
function setup() {
createCanvas(
window.innerWidth,
window.innerHeight
);
background(0);
var x = 0;
@97997
97997 / gist:3a0aa4296dda070b6cdb1805d0acae59
Last active December 26, 2020 23:19
fill disk with random music
import folderooptest
import random
import shutil
import os
targetFolder = r"J:\BlackBerry\music" + "\\"
fill_until_there_are_x_free_megas = 100
music_collection_folder = r"G:\Albums"
path_to_check = r"J:\BlackBerry\music"
import random
from copy import deepcopy
lines = []
f = open("opciones.txt")
for line in f.readlines():
lines.append(line.strip())
def generate(lines):
static_lines = deepcopy(lines)
@97997
97997 / FolderInterface
Last active December 17, 2020 09:55
FolderInterface.py
# Public class members #
# __init__ constructor: can take one optional argument which is the full path of the desired folder
# if no argument is given class will promt user to select a folder
# files -> tuple: tuple of basename files in folder
# folders -> tuple: tuple of foldernames in folder
# path -> string: string of the selected directory