Example usage:
journalctl --unit=NetworkManager --lines=500 | cut --bytes=72- | python log_markov_chain.py
The cut
takes off the timestamp, so the logs actually contain verbatim repitions of some lines [A, B, C, A, ...]
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
Example usage:
journalctl --unit=NetworkManager --lines=500 | cut --bytes=72- | python log_markov_chain.py
The cut
takes off the timestamp, so the logs actually contain verbatim repitions of some lines [A, B, C, A, ...]
[Trigger] | |
Operation = Install | |
Operation = Upgrade | |
Type = Path | |
Target = etc/makepkg.conf | |
Target = usr/share/makepkg/buildenv/lto.sh | |
Target = usr/share/makepkg/executable/strip.sh | |
[Action] | |
Description = Modifying the Makepkg configuration... |
* me_cleaner is a shitty way to disable it because: | |
- PTE isn't fully disabled | |
- not works for everyone | |
- might result in crashes or only works for half hour till it restarts | |
- https://github.com/corna/me_cleaner | |
Better version: | |
- patches Bios code (me firmware) | |
- works better especially for Core i-6000, Core i-7000 | |
- doc/research: http://blog.ptsecurity.com/2017/08/disabling-intel-me.html |
use Purple; | |
use Data::Dumper; | |
%PLUGIN_INFO = ( | |
perl_api_version => 2, | |
name => "Growl", | |
version => "0.1", | |
summary => "Use growl notification for messages.", | |
description => "Use growl notification for messages.", | |
author => "daniel\@netwalk.org", | |
url => "http://pidgin.im", |
Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118
Your problem with Vim is that you don't grok vi.
You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).
The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:
0 go to the beginning of this line. y yank from here (up to where?)