First things first !
sudo apt update
sudo apt upgradesudo apt-get install build-essential git| import sys | |
| import ipaddress | |
| import socket | |
| import fnmatch | |
| import traceback | |
| import itertools | |
| from datetime import datetime | |
| import functools | |
| from urllib.parse import urlparse | |
| from PyQt5.QtCore import QObject, QVariant, QMetaType, pyqtSlot | 
| # Install Gnome and some other useful thins | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger | |
| # I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste | |
| # It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c) | |
| # Switch to root | |
| sudo su - | 
#Progress in C
This is in an example meant to present some ideas regarding command-line progress bars in C.
##Important parts
The main idea is to overwrite stdout with new information every time a particular step is reached. I accomplished this using the VT100 emulator hack from [this Stack Overflow answer][1]. In a nutshell, printing ^[[2K to stdout erases the current line, but it doesn't necessarily move the cursor to the start. Printing \r does that. Also, I decided I wanted to print a newline character after the progress indicator, but I need to get rid of that newline on the next print. That's what \b does: it inserts a backspace, deleting the last character printed.
Also important is the call to fflush, which will guarantee that the print operation completes and is visible before the program moves on to its next task (see [this Stack Overflow answer][2]).
| " ------------------------------ | |
| " Name: vimrc for windows | |
| " Author: keelii | |
| " Email: [email protected] | |
| " ------------------------------ | |
| " Startup {{{ | |
| filetype indent plugin on | |
| augroup vimrcEx | 
| // SSimSuperRes by Shiandow | |
| // | |
| // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Lesser General Public | |
| // License as published by the Free Software Foundation; either | |
| // version 3.0 of the License, or (at your option) any later version. | |
| // | |
| // This library is distributed in the hope that it will be useful, | |
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 
| from libqtile.config import Key, Screen, Group, Drag, Click | |
| from libqtile.command import lazy | |
| from libqtile import layout, bar, widget, hook | |
| import os | |
| import subprocess | |
| mod = "mod4" | |
| terminal = "terminology" | 
| # MikroTik (RouterOS) script for automatically setting DNS records | |
| # for clients when they obtain a DHCP lease. | |
| # | |
| # author SmartFinn <https://gist.github.com/SmartFinn> | |
| :local dnsTTL "00:15:00"; | |
| :local token "$leaseServerName-$leaseActMAC"; | |
| # Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone") | |
| # - truncate length to 63 chars | 
| (setq url-gateway-method 'socks) | |
| (setq socks-server '("Default server" "127.0.0.1" 1080 5)) |