Skip to content

Instantly share code, notes, and snippets.

View fakuivan's full-sized avatar

fakuivan

  • Posadas, Misiones, Argentina
  • 07:40 (UTC -03:00)
View GitHub Profile
@fakuivan
fakuivan / empty_folder_remover.py
Created December 19, 2016 21:49
A simple script that deletes all of those annoing empty folders on your backups
#Empty folder deleter: A simple script that deletes all of those annoing empty folders on your backups
import os
from pathlib import Path
import argparse
def delete_empty_folders(path):
no_empty_dirs = True
for root, dirs, files in os.walk(str(path), topdown=False):
if os.listdir(root) == []:
@fakuivan
fakuivan / ui_common.inc
Created November 28, 2016 19:06
A function that greatly simplifies the use of a target filter on sourcemod
#if defined _ui_common_included
#endinput
#endif
#define _ui_common_included
typedef ActOnTarget = function void (int i_admin, int i_target, any a_data);
stock int Simplified_ProcessTargets(int i_admin, char[] s_target, ActOnTarget f_action, char[] s_format, char[] s_ml_phrase, char[] s_phrase, a_data, int i_flags = 0)
{
char s_target_name[MAX_TARGET_LENGTH];