diff --git a/LICENSE.md b/LICENSE.md index 85265b0..ea20bcd 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1 +1,7 @@ -Public domain +Copyright <2022> + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lubuntu_logo_numix_style/download_logo.sh b/lubuntu_logo_numix_style/download_logo.sh deleted file mode 100644 index de2e2d4..0000000 --- a/lubuntu_logo_numix_style/download_logo.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -*- coding: utf-8 -*- - -A='\033[1;33m' -R='\033[0;31m' -F='\033[0m' - -function copy_logo -{ - echo -e $A'Downloading logo...'$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/lubuntu_logo_numix_style/lubuntu-logo-2.png -P /usr/share/lubuntu/images/ -} - -if [ $USER != root ]; then - echo -e $R'Error: You must be root' - echo -e $Y'Exiting...'$F - notify-send 'My_lubuntu_logo' 'You must execute this script as root' - exit 0 -fi - -copy_logo - -echo -e $A'Script execution done. - created by: Carlos A. Planchón!'$F diff --git a/lubuntu_logo_numix_style/lubuntu-logo-2.png b/lubuntu_logo_numix_style/lubuntu-logo-2.png deleted file mode 100644 index c6163f1..0000000 Binary files a/lubuntu_logo_numix_style/lubuntu-logo-2.png and /dev/null differ diff --git a/pip_upgrade.py b/pip_upgrade.py index 3de11d5..acd5232 100644 --- a/pip_upgrade.py +++ b/pip_upgrade.py @@ -3,8 +3,8 @@ from distutils import sysconfig from distutils.version import LooseVersion from json import loads -from os.path import join as pjoin from os import walk +from os.path import join as pjoin from subprocess import PIPE, run @@ -16,11 +16,11 @@ def get_distutils_packages(): std_lib = sysconfig.get_python_lib(standard_lib=True) for top, dirs, files in walk(std_lib): for nm in files: - if nm != '__init__.py' and nm[-3:] == '.py': + if nm != "__init__.py" and nm[-3:] == ".py": package = pjoin( top, nm - )[len(std_lib) + 1:-3].replace('\\', '.') - distutils_packages.add(package.split('/')[0]) + )[len(std_lib) + 1:-3].replace("\\", ".") + distutils_packages.add(package.split("/")[0]) return distutils_packages @@ -32,7 +32,7 @@ def get_package_versions(): pip list [--outdated|--uptodate] --format=json [--not-required] """ - cmd = 'pip list --outdated --format=json' + cmd = "pip list --outdated --format=json" cmd_response = run(cmd, shell=True, stdout=PIPE) if cmd_response: @@ -45,36 +45,36 @@ def sort_packages(packages): Sort packages into major/minor/unknown. """ sorted_packages = { - 'major': [], - 'minor': [], - 'unknown': [], + "major": [], + "minor": [], + "unknown": [], } for package in packages: # No version info - if 'latest_version' not in package or 'version' not in package: - sorted_packages['unknown'].append(package) + if "latest_version" not in package or "version" not in package: + sorted_packages["unknown"].append(package) try: - latest = LooseVersion(package['latest_version']) - current = LooseVersion(package['version']) + latest = LooseVersion(package["latest_version"]) + current = LooseVersion(package["version"]) except ValueError: # Unable to parse the version into anything useful - sorted_packages['unknown'].append(package) + sorted_packages["unknown"].append(package) # If the current version is larger than the latest # (e.g. a pre-release is installed) put it into the unknown section. - # Technically its 'unchanged' but I guess its better to have + # Technically its "unchanged" but I guess its better to have # pre-releases stand out more. if current > latest: - sorted_packages['unknown'].append(package) + sorted_packages["unknown"].append(package) # Major upgrade (first version number) if latest.version[0] > current.version[0]: - sorted_packages['major'].append(package) + sorted_packages["major"].append(package) # Everything else is a minor update - sorted_packages['minor'].append(package) + sorted_packages["minor"].append(package) return sorted_packages @@ -87,7 +87,7 @@ def upgrade_packages(major=True, minor=True): Linux programs which depends of it. """ - print('· Getting packages...') + print("· Getting packages...") package_versions = get_package_versions() if package_versions: @@ -99,30 +99,30 @@ def upgrade_packages(major=True, minor=True): total_upgrades = 0 if major: - print('- - - Checking major updates - - -') - for package in sorted_packages['major']: - package_name = package['name'] + print("- - - Checking major updates - - -") + for package in sorted_packages["major"]: + package_name = package["name"] if package_name not in distutils_packages: packages_to_upgrade.add(package_name) total_upgrades += 1 - print(f'{package_name} will be upgraded.') + print(f"{package_name} will be upgraded.") if minor: - print('- - - Checking minor updates - - -') - for package in sorted_packages['minor']: - package_name = package['name'] + print("- - - Checking minor updates - - -") + for package in sorted_packages["minor"]: + package_name = package["name"] if package_name not in distutils_packages: packages_to_upgrade.add(package_name) total_upgrades += 1 - print(f'{package_name} will be upgraded.') + print(f"{package_name} will be upgraded.") - print('- - - Upgrading packages - - -') + print("- - - Upgrading packages - - -") for package in packages_to_upgrade: - run(f'sudo -H pip install -U {package}', shell=True) + run(f"sudo -H pip install -U {package}", shell=True) else: - print('Packages could not be obtained.') + print("Packages could not be obtained.") -if __name__ == '__main__': +if __name__ == "__main__": upgrade_packages() diff --git a/ubuntu_minecraft_installer/install_minecraft.sh b/ubuntu_minecraft_installer/install_minecraft.sh deleted file mode 100644 index af07bbc..0000000 --- a/ubuntu_minecraft_installer/install_minecraft.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# -*- coding: utf-8 -*- - -A='\033[1;33m' -R='\033[0;31m' -F='\033[0m' - -function install_minecraft -{ - echo -e $A'Creating programs folder...'$F - mkdir ~/programs - - echo -e $A'Creating Minecraft official launcher folder...'$F - mkdir ~/programs/minecraft_official_launcher - - echo -e $A'Creating Minecraft pirated launcher folder...'$F - mkdir ~/programs/minecraft_pirated_launcher - - echo -e $A'Creating ~/.minecraft folder...'$F - mkdir ~/.minecraft - - echo -e $A'Creating ~/.minecraft/versions folder...'$F - mkdir ~/.minecraft/versions - - - echo -e $A'Downloading Minecraft to ~/programs/minecraft_official_launcher...'$F - wget http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar -P ~/programs/minecraft_official_launcher - mv ~/programs/minecraft_official_launcher/Minecraft.jar ~/programs/minecraft_official_launcher/minecraft.jar - - echo -e $A'Downloading Minecraft pirated launcher...'$F - wget http://download1639.mediafire.com/21c1ey2qr78g/odn0bfm1nbws2bd/minecraft_launcher_20-6-2016.zip - - echo -e $A'Unzipping Minecraft pirated launcher in ~/programs/minecraft_pirated_launcher...'$F - unzip minecraft_launcher_20-6-2016.zip -d ~/programs/minecraft_pirated_launcher - - echo -e $A'Removing compressed Minecraft pirated launcher...'$F - rm minecraft_launcher_20-6-2016.zip - - - echo -e $A"Downloading Minecraft launcher's icon..."$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/ubuntu_minecraft_installer/minecraft_launcher_icon.png -P ~/programs/minecraft_official_launcher - - echo -e $A"Downloading Minecraft pirated launcher's icon..."$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/ubuntu_minecraft_installer/minecraft_pirated_launcher_icon.png -P ~/programs/minecraft_pirated_launcher - - - echo -e $A'Downloading Minecraft 1.8.9_mods to ~/minecraft/versions...'$F - wget http://download1275.mediafire.com/u5hggmi75qlg/nn17hukabh41ckn/1.8.9_mods.zip -P ~/.minecraft/versions - unzip ~/.minecraft/versions/1.8.9_mods.zip -d ~/.minecraft/versions/ - rm ~/.minecraft/versions/1.8.9_mods.zip - - echo -e $A'Downloading Minecraft 1.9.2_mods to ~/minecraft/versions...'$F - wget http://download1306.mediafire.com/2i01vticz88g/6sngqlr7fv4e0cs/1.9.2_mods.zip -P ~/.minecraft/versions - unzip ~/.minecraft/versions/1.9.2_mods.zip -d ~/.minecraft/versions/ - rm ~/.minecraft/versions/1.9.2_mods.zip - - echo -e $A'Downloading Minecraft 1.9.4_mods to ~/minecraft/versions...'$F - wget http://download931.mediafire.com/cruu012btwfg/hgsi5i9vnkuit8t/1.9.4_mods.zip -P ~/.minecraft/versions - unzip ~/.minecraft/versions/1.9.4_mods.zip -d ~/.minecraft/versions/ - rm ~/.minecraft/versions/1.9.4_mods.zip - - echo -e $A'Downloading Minecraft 1.10_mods to ~/minecraft/versions...'$F - wget http://download1377.mediafire.com/9om9171ufdug/54zzcmg9c5s3oc4/1.10_mods.zip -P ~/.minecraft/versions - unzip ~/.minecraft/versions/1.10_mods.zip -d ~/.minecraft/versions/ - rm ~/.minecraft/versions/1.10_mods.zip - - - echo -e $A'Creating ~/.local/share/applications folder...'$F - mkdir ~/.local/share/applications - - echo -e $A'Downloading minecraft_official_launcher.desktop to ~/.local/share/applications...'$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/ubuntu_minecraft_installer/minecraft_official_launcher.desktop -P ~/.local/share/applications - mv ~/.local/share/applications/minecraft_official_launcher.desktop ~/.local/share/applications/Minecraft.desktop - - echo -e $A'Downloading minecraft_pirated_launcher.desktop to ~/.local/share/applications...'$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/ubuntu_minecraft_installer/minecraft_pirated_launcher.desktop -P ~/.local/share/applications - mv ~/.local/share/applications/minecraft_pirated_launcher.desktop ~/.local/share/applications/Pirated\ Minecraft.desktop - - echo -e $A'Adding execution flags to Minecraft official launcher...'$F - chmod 724 ~/programs/minecraft_official_launcher/minecraft.jar - - echo -e $A'Adding execution flags to Minecraft pirated launcher...'$F - chmod 724 ~/programs/minecraft_pirated_launcher/shinigima.jar -} - -install_minecraft - -echo -e $Y'--- READY ---!'$F -echo -e $A'Script execution done - created by: Carlos A. Planchón!'$F diff --git a/ubuntu_minecraft_installer/launch_official_minecraft.sh b/ubuntu_minecraft_installer/launch_official_minecraft.sh deleted file mode 100644 index b7e1a5f..0000000 --- a/ubuntu_minecraft_installer/launch_official_minecraft.sh +++ /dev/null @@ -1 +0,0 @@ -java -Xmx400M -Xms400M -jar ~/programs/minecraft_official_launcher/minecraft.jar diff --git a/ubuntu_minecraft_installer/launch_pirated_minecraft.sh b/ubuntu_minecraft_installer/launch_pirated_minecraft.sh deleted file mode 100644 index ed303d2..0000000 --- a/ubuntu_minecraft_installer/launch_pirated_minecraft.sh +++ /dev/null @@ -1 +0,0 @@ -java -Xmx400M -Xms400M -jar ~/programs/minecraft_pirated_launcher/shinigima.jar diff --git a/ubuntu_minecraft_installer/minecraft_launcher_icon.png b/ubuntu_minecraft_installer/minecraft_launcher_icon.png deleted file mode 100644 index 8b9732a..0000000 Binary files a/ubuntu_minecraft_installer/minecraft_launcher_icon.png and /dev/null differ diff --git a/ubuntu_minecraft_installer/minecraft_official_launcher.desktop b/ubuntu_minecraft_installer/minecraft_official_launcher.desktop deleted file mode 100644 index 0e68bd7..0000000 --- a/ubuntu_minecraft_installer/minecraft_official_launcher.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Minecraft -Icon=~/programs/minecraft_official_launcher/minecraft_launcher_icon.png -Exec="java -Xmx400M -Xms400M -jar ~/programs/minecraft_official_launcher/minecraft.jar" %f -Comment=Minecraft! -Categories=Game; -Terminal=false -Name[en_US]=Minecraft -Comment[en_US]=Minecraft! diff --git a/ubuntu_minecraft_installer/minecraft_pirated_launcher.desktop b/ubuntu_minecraft_installer/minecraft_pirated_launcher.desktop deleted file mode 100644 index d544302..0000000 --- a/ubuntu_minecraft_installer/minecraft_pirated_launcher.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Pirated Minecraft -Icon=~/programs/minecraft_pirated_launcher/minecraft_pirated_launcher_icon.png -Exec="java -Xmx400M -Xms400M -jar ~/programs/minecraft_pirated_launcher/shinigima.jar" %f -Comment=Pirated Minecraft! -Categories=Game; -Terminal=false -Name[en_US]=Pirated Minecraft -Comment[en_US]=Minecraft! diff --git a/ubuntu_minecraft_installer/minecraft_pirated_launcher_icon.png b/ubuntu_minecraft_installer/minecraft_pirated_launcher_icon.png deleted file mode 100644 index 3db3444..0000000 Binary files a/ubuntu_minecraft_installer/minecraft_pirated_launcher_icon.png and /dev/null differ diff --git a/urucrafters_fixlog.py b/urucrafters_fixlog.py index 7488703..2170de0 100644 --- a/urucrafters_fixlog.py +++ b/urucrafters_fixlog.py @@ -1,25 +1,23 @@ #!/usr/bin/env python3 -from os import system -system('touch converted.log') +HOUR_DIFFERENCE = 5 -hour_difference = 5 -with open('latest.log', 'r') as log: - with open('converted.log', 'w') as converted: +with open("latest.log", "r") as log: + with open("converted.log", "w") as converted: for line in log.readlines(): - if line[0] == '[': - hour = int(line[1:3]) - hour_difference + if line[0] == "[": + hour = int(line[1: 3]) - HOUR_DIFFERENCE - if int(hour) < 0: + if int(hour) < 0: hour += 24 hour = str(hour) if len(hour) == 1: - hour = '0' + hour + hour = "0" + hour - line = '[' + hour + line[3:] + line = "[" + hour + line[3:] - if not '[Server thread/WARN]' in line: - converted.write(line) + if "[Server thread/WARN]" not in line: + converted.write(line) diff --git a/vimrc b/vimrc deleted file mode 100644 index b5687ab..0000000 --- a/vimrc +++ /dev/null @@ -1,119 +0,0 @@ -set nocompatible " required -filetype off " required - -" set the runtime path to include Vundle and initialize -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() - -" alternatively, pass a path where Vundle should install plugins -"call vundle#begin('~/some/path/here') - -" let Vundle manage Vundle, required -Plugin 'gmarik/Vundle.vim' - -" add all your plugins here (note older versions of Vundle -" used Bundle instead of Plugin) - -" ... - -" All of your Plugins must be added before the following line -call vundle#end() " required -filetype plugin indent on " required - -"split navigations -nnoremap -nnoremap -nnoremap -nnoremap - -" Enable folding -set foldmethod=indent -set foldlevel=99 - -" Enable folding with the spacebar -nnoremap za - -Plugin 'tmhedberg/SimpylFold' - -let g:SimpylFold_docstring_preview=1 - -au BufNewFile,BufRead *.py - \ set tabstop=4 - \ set softtabstop=4 - \ set shiftwidth=4 - \ set textwidth=79 - \ set expandtab - \ set autoindent - \ set fileformat=unix - -au BufNewFile,BufRead *.js,*.html,*.css - \ set tabstop=2 - \ set softtabstop=2 - \ set shiftwidth=2 - -Plugin 'vim-scripts/indentpython.vim' - -au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ -set encoding=utf-8 - -let g:ycm_autoclose_preview_window_after_completion=1 -map g :YcmCompleter GoToDefinitionElseDeclaration - -Plugin 'vim-syntastic/syntastic' -Plugin 'nvie/vim-flake8' - -let python_highlight_all=1 -syntax on - -Plugin 'jnurmine/Zenburn' -Plugin 'altercation/vim-colors-solarized' - -if has('gui_running') - set background=dark - colorscheme solarized -else - colorscheme zenburn -endif - -call togglebg#map("") - -Plugin 'scrooloose/nerdtree' -let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree -nnoremap :NERDTreeToggle - -Plugin 'kien/ctrlp.vim' - -set nu -Plugin 'tpope/vim-fugitive' - -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' - -" let g:airline_powerline_fonts = 1 - -set clipboard=unnamed - -call plug#begin('~/.vim/plugged') - -" assuming you're using vim-plug: https://github.com/junegunn/vim-plug -Plug 'ncm2/ncm2' -Plug 'roxma/nvim-yarp' - -" enable ncm2 for all buffers -autocmd BufEnter * call ncm2#enable_for_buffer() - -" IMPORTANT: :help Ncm2PopupOpen for more information -set completeopt=noinsert,menuone,noselect - -" NOTE: you need to install completion sources to get completions. Check -" our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki -Plug 'ncm2/ncm2-bufword' -Plug 'ncm2/ncm2-path' - -" Fast python completion (use ncm2 if you want type info or snippet support) -Plug 'HansPinckaers/ncm2-jedi' - -let g:airline#extensions#tabline#enabled = 1 -let g:airline_statusline_ontop=1 - -call plug#end() diff --git a/wallpaper_downloader/_m_._e__h__9043.jpg b/wallpaper_downloader/_m_._e__h__9043.jpg deleted file mode 100644 index 6c6d872..0000000 Binary files a/wallpaper_downloader/_m_._e__h__9043.jpg and /dev/null differ diff --git a/wallpaper_downloader/download_wallpapers.sh b/wallpaper_downloader/download_wallpapers.sh deleted file mode 100644 index 60ffdc5..0000000 --- a/wallpaper_downloader/download_wallpapers.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -*- coding: utf-8 -*- - -A='\033[1;33m' -R='\033[0;31m' -F='\033[0m' - -function copy_wallpaper -{ - echo -e $A'Downloading wallpaper...'$F - wget https://raw.githubusercontent.com/carlosplanchon/scripts/master/wallpaper_downloader/_m_._e__h__9043.jpg -P /usr/share/lubuntu/wallpapers -} - -if [ $USER != root ]; then - echo -e $R'Error: You must be root' - echo -e $Y'Exiting...'$F - notify-send 'Download_wallpaper' 'You must execute this script as root' - exit 0 -fi - -copy_wallpaper - -echo -e $A'Script execution done. - created by: Carlos A. Planchón!'$F diff --git a/wallpapers/luke-stackpoole-649894-unsplash.jpg b/wallpapers/luke-stackpoole-649894-unsplash.jpg deleted file mode 100644 index 9011da5..0000000 Binary files a/wallpapers/luke-stackpoole-649894-unsplash.jpg and /dev/null differ diff --git a/wallpapers/readme.txt b/wallpapers/readme.txt deleted file mode 100644 index d4ca682..0000000 --- a/wallpapers/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Folder to save wallpapers. diff --git a/wallpapers/wallhaven-168650.jpg b/wallpapers/wallhaven-168650.jpg deleted file mode 100644 index 028646f..0000000 Binary files a/wallpapers/wallhaven-168650.jpg and /dev/null differ diff --git a/wallpapers/wallhaven-228126.jpg b/wallpapers/wallhaven-228126.jpg deleted file mode 100644 index 4c87d04..0000000 Binary files a/wallpapers/wallhaven-228126.jpg and /dev/null differ diff --git a/wallpapers/wallhaven-24636.jpg b/wallpapers/wallhaven-24636.jpg deleted file mode 100644 index 5bc09cf..0000000 Binary files a/wallpapers/wallhaven-24636.jpg and /dev/null differ diff --git a/wallpapers/wallhaven-643158.jpg b/wallpapers/wallhaven-643158.jpg deleted file mode 100644 index d44e076..0000000 Binary files a/wallpapers/wallhaven-643158.jpg and /dev/null differ diff --git a/wallpapers/wallhaven-657095.jpg b/wallpapers/wallhaven-657095.jpg deleted file mode 100644 index cdda1ed..0000000 Binary files a/wallpapers/wallhaven-657095.jpg and /dev/null differ