A dropdown list for markdown
- First item must be preceeded with an empty line.
- Markdown renders perfectly.
- Extra item.
import subprocess | |
import platform | |
import re | |
class ping(): | |
server = 'ya.ru' | |
verbose = False | |
def __init__(self, server: str = 'ya.ru', verbose: bool = False): |
# Apache Configuration File | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have access | |
# to the main server config file (usually called `httpd.conf`), you should add | |
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. | |
# ############################################################################## | |
# # CROSS-ORIGIN RESOURCE SHARING (CORS) # | |
# ############################################################################## |
set nocompatible " be iMproved, 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 |
############################################################################ | |
#### Cтандартный .htaccess #### | |
############################################################################ | |
RewriteEngine On | |
# Директива включает редиректы. | |
RewriteBase / | |
# Без директивы (.*) = /$1 будет /var/wwww/site/web/$1 с директивой = /$1 | |
Options +FollowSymLinks | |
# Разрешает переход по символическим ссылкам. |
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
# Цветной вывод текста в консоль Python. | |
# print colored text in terminal in Python | |
# get from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python | |
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
FAIL = '\033[91m' |
# copy from https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console | |
# Print iterations progress | |
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', printEnd = "\r"): | |
""" | |
Call in a loop to create terminal progress bar | |
@params: | |
iteration - Required : current iteration (Int) | |
total - Required : total iterations (Int) | |
prefix - Optional : prefix string (Str) | |
suffix - Optional : suffix string (Str) |
# -*- coding: utf-8 -*- | |
import yaml | |
import io | |
configFile = 'test_yaml.yaml' | |
# Define data | |
data = { | |
'a list': [ |
import ctypes # Required to obtain the keyboard layout | |
def get_keyboard_language(): | |
""" | |
Gets the keyboard language in use by the current | |
active window process. | |
""" | |
# My keyboard is set to the English - United States keyboard | |
# For debugging Windows error codes in the current thread | |
user32 = ctypes.WinDLL('user32', use_last_error=True) |