Skip to content

Instantly share code, notes, and snippets.

View alexeymuranov's full-sized avatar

Alexey Muranov alexeymuranov

View GitHub Profile
@alexeymuranov
alexeymuranov / journalctl.md
Created August 10, 2021 20:48
journalctl output just before the hard reboot
$ journalctl --since "2021-08-10 23:35:00" --until "2021-08-10 23:38:00"
-- Journal begins at Wed 2021-08-04 14:51:51 EEST, ends at Tue 2021-08-10 23:45:52 EEST. --
août 10 23:35:00 Alexey-BU403UA-NixOS org.gnome.Evolution.desktop[3579]: (WebKitWebProcess:2): dbind-WARNING **: 23:35:00.252: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
août 10 23:35:02 Alexey-BU403UA-NixOS .gnome-shell-wr[1762]: Failed to execute child process “/bin/bash” (No such file or directory)
août 10 23:35:03 Alexey-BU403UA-NixOS org.gnome.Evolution.desktop[3606]: (WebKitWebProcess:2): dbind-WARNING **: 23:35:03.164: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
août 10 23:35:06 Alexey-BU403UA-NixOS org.gnome.Evolution.desktop[3629]: (WebKitWebProcess:2): dbind-WARNING **: 23:35:06.231: AT-SPI: Error retrieving accessibility bus address: org.free
@alexeymuranov
alexeymuranov / fancy-state.py
Last active May 7, 2019 19:58
Stateful classes in Python using Ruby-like eigenclasses with mixins.
class T:
"""
Descendant of `object` that rectifies `__new__` overriding.
This class is intended to be listed as the last base class (just
before the implicit `object`). It is a part of a workaround for
* https://bugs.python.org/issue36827
"""
__slots__ = ()
@alexeymuranov
alexeymuranov / nixos-rebuild-output.txt
Created February 24, 2019 21:34
Full output of nixos-rebuild for Nixpkgs issue #55945
[root@Alexey-MacBook-NixOS:/home/alexey]# nixos-rebuild boot -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/9bd45dddf81.tar.gz
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/04xprmy40gmsi6afv8l7whx02b4h44k9-unit-network-manager.service.drv
/nix/store/0izclhpgxisf6x7j0z1i7242pamcmcxc-unit-mdadm-grow-continue-.service.drv
/nix/store/0np51znn341ka7d242p5nd5s0zjr2bcl-unit-save-hwclock.service.drv
/nix/store/srcnbzmqy0ac9wd198q3w3lrjva42n36-system-path.drv
/nix/store/0vmg7bwl6kan3qhpjfn909kvmyg7izvv-unit-polkit.service.drv
/nix/store/icpwnb7lgfl6my7443pvk3vlkaaigp9l-hplip-3.18.5.drv
@alexeymuranov
alexeymuranov / carry_fixed_point.py
Last active December 13, 2018 13:14
Carry's fixed-point fonction for transformations of functions
# Fixed-point function without explicit recursion:
def fix(f):
def self_applied(self_applied):
return f(wrap_selfappl(self_applied))
return wrap_selfappl(self_applied)
# Auxiliary function:
def wrap_selfappl(f):
def w(*args, **kwargs):
return f(f)(*args, **kwargs)
@alexeymuranov
alexeymuranov / out.txt
Created October 3, 2016 18:27
`journalctl -xb` output
-- Logs begin at Sat 2016-08-27 20:23:58 CEST, end at Mon 2016-10-03 20:15:29 CEST. --
Oct 03 20:10:38 nixos systemd-journald[445]: Runtime journal (/run/log/journal/) is 8.0M, max 142.9M, 134.9M free.
Oct 03 20:10:39 nixos systemd-journald[445]: System journal (/var/log/journal/) is 96.0M, max 4.0G, 3.9G free.
Oct 03 20:10:40 nixos systemd-journald[445]: Time spent on flushing to /var is 1.405796s for 2 entries.
Oct 03 20:10:40 nixos kernel: microcode: CPU0 microcode updated early to revision 0x60f, date = 2010-09-29
Oct 03 20:10:40 nixos kernel: Initializing cgroup subsys cpuset
Oct 03 20:10:40 nixos kernel: Initializing cgroup subsys cpu
Oct 03 20:10:40 nixos kernel: Initializing cgroup subsys cpuacct
Oct 03 20:10:40 nixos kernel: Linux version 4.4.19 (nixbld@localhost) (gcc version 5.3.0 (GCC) ) #1-NixOS SMP Sat Aug 20 16:09:38 UTC 2016
Oct 03 20:10:40 nixos kernel: Command line: initrd=\efi\nixos\5rl82h525bfvcicfsk7xhfhzhxravxca-initrd-initrd.efi systemConfig=/nix/store/bbjmx4hfxcx2blzf655j773995i7r8ay-n