С самого выхода Космической одиссеи Стенли Кубрика люди мечтали
иметь компьютер, с которым можно было бы общаться так же, как с
другим человеком. Прошло уже почти полвека с момента выхода сей
культовой картины, а технологии лишь недавно позволили людям
приблизиться к технологиям воображаемого будущего. И хотя космические
корабли всё ещё слабо бороздят Большой театр просторы Вселенной,
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 python3 | |
USAGE = """ ./timesg.py TIMESTAMP [HOURS] <dmesg >dmesg-with-time """ | |
import sys | |
import re | |
import datetime | |
RE = re.compile(r'^\[\s*(\d+\.\d+)\]') |
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 python | |
devices_file = open('/proc/bus/pci/devices').readlines() | |
raw_id = [x.split('\t')[1] for x in devices_file] | |
vend_and_dev = [(x[:4], x[4:]) for x in raw_id] | |
pci_ids = open('/usr/share/hwdata/pci.ids').readlines() | |
ids_lib = {} | |
dev = "" | |
vendor = "" |
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
-- Insert in your rc.lua to globalkeys (may be after mod+x) defining | |
-- In awesome 4.0 : | |
awful.key({ modkey }, "c", | |
function () | |
awful.prompt.run { | |
prompt = "Calculate: ", | |
textbox = awful.screen.focused().mypromptbox.widget, | |
exe_callback = function (text) | |
awful.spawn.easy_async( | |
"python -c \"from math import * ; print(" .. text .. ")\"", |
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 | |
# partitions | |
parted /dev/sda -- mklabel msdos | |
parted /dev/sda -- mkpart primary 1MiB 100% | |
mkfs.ext4 -L nixos /dev/sda1 | |
mount /dev/sda1 /mnt | |
# nixos | |
nixos-generate-config --root /mnt |
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
gears.timer.start_new(60, function() | |
if os.date("*t").hour >= 23 then | |
naughty.notify({ | |
text = "It's too late!", | |
title = "Go sleep!", | |
position = "top_right", | |
timeout = 60, | |
bg = "#f06060", | |
fg = "#EEE9EF", | |
widht = 200, |
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
H4sIAPL+LFwAA9T8A9AwvbcviD62bds23se2bZvvY9u2bdu2bds27vffOLPnnF13zlRN3ambqu6s | |
rHR6JanO6pX1SyLiaGFFoGTgbGFCQEsg5m5ja2dvYvxPgpHO3tgU4P+ZwPBPYGNh+VfMyM7K8F9j | |
Bgamf2UyAzAyszAysTD/k2IE+CeXiYkVgIDh/yH5/1+Di5OzgSMBAYC9nZOzk5Wjhb3zf//c/1X+ | |
/58GUnlhUVpGOmYo0qHjh+PL0se8uaERKCYCBgI7Q0soHh4CemkTWzNncwKWf1iKBPSiFtbOJo7/ | |
xNYGzibCJkZ2xiYEfHxQTs6OJgY2UG4byzqbMTjt8d6nanNW+nmArpNdejlgL/or6oMhvHF+3vOT | |
ecvAY7YSVhLAm769XczqycvZfxcaGC/gVFTxEtIRQ0Oj9nbvY99u05hef6EdfIv6F84iVYPkq1R+ | |
zh+Jf/S+EBsjh377et9/oId3e0dIvm6fX2+gx4IdsH/y9Gl7W/S+7wCdSuikDck4Ou1fwdWQ6x8K | |
kkbk3pqFnokzYqkJPN4SELzdzREMAnJEnjrZ14agt/W0zVdFR1wEX0+Af6Z9F6H7UXrfMXs/TrSe | |
TmrfQtnx8Hcgd6V42YJjJXdVamqxvM6W/+4eeN8RrvlC30GS0Y+44FQTR9V83K1eMhZ8GnWBFD7N | |
4mOi6twIOJslreoLM+8kpGMo3AhMuAqEnnQPMs/lLwUmREC7jF19v6pP9YelfKR/Ysw/U0hd5Apw |
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
\usepackage{fontspec} | |
\usepackage{xunicode} | |
\usepackage{xltxtra} | |
\usepackage{polyglossia} | |
\setmainlanguage[babelshorthands=true]{russian} | |
\setotherlanguage{english} | |
\setmonofont{Courier New} | |
\newfontfamily\cyrillicfonttt{Courier New}[Script = Cyrillic] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
" Показывать номера строк | |
set number | |
" Включить подсветку синтаксиса | |
syntax on | |
" Поиск в процессе набора | |
set incsearch | |
" Подсвечивание результатов поиска | |
set hlsearch | |
" умная зависимость от регистра. Детали `:h smartcase` | |
set ignorecase |
NewerOlder