This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="shop_sales_table" | |
class="table table-condensed table-striped table-hover" | |
data-search="true" | |
data-toolbar="#custom-toolbar"> | |
<thead> | |
<tr> | |
<th rowspan="2" data-field="id_surr">#</th> | |
<th rowspan="2" data-field="id">Raw ID</th> | |
<th rowspan="2" data-field="time_sold" data-align="left">Время продажи</th> | |
<th colspan="3" data-field="products" data-align="left">Товары</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
source openrc | |
neutron net-create ext-net --router:external True | |
neutron subnet-create ext-net --name ext-subnet --allocation-pool start=171.100.1.3,end=171.100.1.100 --disable-dhcp --gateway 171.100.1.1 171.100.1.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img | |
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img | |
source openrc | |
glance image-create --name cirros386 --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img | |
glance image-create --name cirros64 --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-x86_64-disk.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
source openrc | |
nova flavor-create m1.nano 42 64 0 1 | |
neutron net-create internal001; neutron subnet-create --name internal001 internal001 192.168.200.0/24 | |
nova boot --flavor m1.nano --image cirros64 --nic net-name=internal001 cirros_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3dCFNCYVxHQQD+/X1JJ9auAzpj15AkEl6yO4lJ1XL43ljxJbzWXXl3RN9vAjiBE1tvxEfuPEIxF7kO2sc1xPKtkw40RIwXrDIGfjlVCaBLtnxCPnCQX349UMSJl/AXpkHqKGVeAW+AO4zbeI8XnS9aDNMuX6ncgrLRMxWCxETL3J/IIE1LZ5v0QvyQBHuJc5jbyODVb4onff296SbjzYm96elJZcRFo4FzFaIcKtis+Sm4+6OAGCNDIXxfB9e5TK579x+L+ci/W1k83Fcz6NpQU/OM1R1CZVMap/Xet424aRMFPmA8sTF4hdYvWd6adBihco2isaW51b1Gkc+K9N9wELiEBMpdKQtqkPOvm98UhoRk7Wp+8+zSamj1uEs/7m6VCGFebq8V3xqTexWH2dCUznxZ5+KS6WLBh+3f4P6wG8VuWfgFjIUf7jjYKjidBXfSXFDxRkhf/LV8V0jLv+Ma1mjKBUX+rk7IFxm0X/PkjqNhVFlg3rH4Wre0+9WdsTCyzWS0HEaTxIKdPtwwULLEiwClO1LLebdlVjx9yhen0czXxMAHONbZeTvxN8ULfei+b7c07oYm16T8T9JAdiWn5nGxiT8TAUrCPBJMpbE4xQJLztYhAbMpfhFSdkKfTotFxTK9AKpTg4TZFY0NYOktFtV2R9ZnzP7hHZDSIg2Bw== [email protected] | |
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAp8ptUdiYi50N4DlKnv4HMmNqTAE/Q5V16flVecA3nIhf5eDyb0189pVxz0UA8KUh77wFS4aDhelFSoAdrkBVSLBFE+iX5D9oc9NICgclEjs8IzVwajRJXDloKwStaNYDgh5AHXl9ksSOa+MhHk4xtNYCFvCJIubwjEPWK9wMFwhhC7loQt96xybzCJehMmFRt8hq8TVwHrUwsHtzHA+o7rL8jip2EXow9m/VsnfQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#For identifying our monitors use xrandr tool and view output | |
LVDS=LVDS1 # could be another one like: LVDS, LVDS-1, etc | |
HDMI=HDMI1 # could be another one like: HDMI, HDMI-1, etc | |
EXTRA="--right-of $LVDS" # addtional info while dual display | |
# Lets check both LVDS and HDMI state from the string "$display connected " | |
xrandr | grep -q "$LVDS connected " && LVDS_IS_CON=1 || LVDS_IS_CON=0 | |
xrandr | grep -q "$HDMI connected " && HDMI_IS_CON=1 || HDMI_IS_CON=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
count="${1}" | |
if [[ -z "${1}" ]]; then | |
count=20 | |
fi | |
for ((process=1; process<="${count}"; process++)); do | |
(bash -c "while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done" &); | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import re | |
import subprocess | |
import sys | |
HOST = "ya.ru" | |
FILE_NAME_TEMPLATE = "ping_report_{}.txt" | |
def get_dt_from_line(line): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HEX_CHARS = { | |
'0': 0, | |
'1': 1, | |
'2': 2, | |
'3': 3, | |
'4': 4, | |
'5': 5, | |
'6': 6, | |
'7': 7, | |
'8': 8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH models AS ( | |
WITH data AS ( | |
SELECT | |
replace(initcap(table_name::text), '_', '') table_name, | |
replace(initcap(column_name::text), '_', '') column_name, | |
CASE data_type | |
WHEN 'timestamp without time zone' THEN 'time.Time' | |
WHEN 'timestamp with time zone' THEN 'time.Time' | |
WHEN 'boolean' THEN 'bool' | |
-- add your own type converters as needed or it will default to 'string' |
OlderNewer