First things first !
sudo apt update
sudo apt upgrade
sudo 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) | |
# Some useful services | |
pacman -S acpid ntp dbus cups cronie |
#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" |
(setq url-gateway-method 'socks) | |
(setq socks-server '("Default server" "127.0.0.1" 1080 5)) |
Copyright 2018 Dominik Liebler | |
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 O |