Skip to content

Instantly share code, notes, and snippets.

View benchi99's full-sized avatar
😵‍💫
Woah, my head's spinning!

Rubén Bermejo benchi99

😵‍💫
Woah, my head's spinning!
View GitHub Profile
@benchi99
benchi99 / rename_bandcamp_tracks.py
Created April 7, 2023 11:46
bandcamp, why the hell can't you name your downloaded album track files so the NUMBER is the first thing in the file, files do NOT sort properly if the files start with the artist name man
# Upon running this script on a directory you pass as a first argument to it,
# it'll rename all files it can find with the following structure:
# "{artist name} - {album name} - {song number and name}.{file extension}"
# to follow this structure instead:
# "{song number and name} - {artist name}.{file extension}"
import os, sys, re
regex_artist_name = r'^[^0-9]{2}.*?- '
// Custom arms race
bot_kick
mp_teammates_are_enemies 1
mp_randomspawn 1
sv_gravity 300
// Custom arms race
bot_kick
mp_teammates_are_enemies 1
mp_randomspawn 1
@benchi99
benchi99 / customwingman.cfg
Created January 30, 2021 17:59
Custom settings for a CS:GO match set to Wingman
mp_autokick 0
ff_damage_reduction_bullets 1
ff_damage_reduction_grenade 1
ff_damage_reduction_other 1
mp_warmuptime 10
bot_quota 4
bot_quota_mode fill
@benchi99
benchi99 / reduced_comp.cfg
Created January 30, 2021 17:58
Custom settings for a CS:GO match set to Competitive
mp_maxrounds 16
mp_autokick 0
ff_damage_reduction_bullets 1
ff_damage_reduction_grenade 1
ff_damage_reduction_other 1
bot_quota 6
bot_quota_mode fill
mp_warmuptime 10
@benchi99
benchi99 / SubclassMapper.java
Last active June 16, 2020 07:01
Mapping subclasses with Reflections
package com.rubenbermejo.gists
import com.reflections.Reflections
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
@benchi99
benchi99 / AccionesMenuSnip.cs
Last active October 31, 2019 09:03
edit resolution getting from dropdown
public void VideoSettingsChange() {
string resolutionSelection = resolution.value.ToString();
int width = Int32.Parse(resolutionSelection.Substring(0, resolutionSelection.IndexOf('x')));
int height = Int32.Parse(resolutionSelection.Substring(resolutionSelection.IndexOf('x') + 1);
Screen.SetResolution(width, height, (FullScreenMode)fsms.value, 60);
}