Skip to content

Instantly share code, notes, and snippets.

Avatar
🇺🇦
Stand with Ukraine

Piotr Miller nwg-piotr

🇺🇦
Stand with Ukraine
View GitHub Profile
View wcm-error.txt
$ wcm
II 08-11-20 20:59:09.762 - [subprojects/wf-config/src/file.cpp:445] Reading XML configuration options from directory /opt/wayfire/share/wayfire/metadata
II 08-11-20 20:59:09.762 - [subprojects/wf-config/src/file.cpp:456] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/keycolor.xml
II 08-11-20 20:59:09.763 - [subprojects/wf-config/src/file.cpp:456] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/simple-tile.xml
II 08-11-20 20:59:09.765 - [subprojects/wf-config/src/file.cpp:456] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/grid.xml
II 08-11-20 20:59:09.766 - [subprojects/wf-config/src/file.cpp:456] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/scale.xml
II 08-11-20 20:59:09.767 - [subprojects/wf-config/src/file.cpp:456] Reading XML configuration options from file /opt/wayfire/share/wayfire/metadata/idle.xml
II 08-11-20 20:59:09.767 - [subprojects/wf-config/src/file.cpp:456]
View meson-log.txt
Build started at 2020-11-08T20:06:43.595841
Main binary: /usr/bin/python
Build Options: -Dprefix=/opt/wayfire
Python system: Linux
The Meson build system
Version: 0.56.0
Source dir: /home/piotr/Clones/wf-install/wf-shell
Build dir: /home/piotr/Clones/wf-install/wf-shell/build
Build type: native build
Project name: wf-shell
@nwg-piotr
nwg-piotr / main.cpp
Created Aug 4, 2020
Pudges exercise in C++
View main.cpp
#include <iostream>
#include <string>
int main(int argc, char *argv[]) {
for (int i=1000; i<10000; i++) {
std::string s = std::to_string(i);
int sum = std::stoi(s.substr(0, 2)) + std::stoi(s.substr(2, 2));
if (sum * sum == i) {
std::cout << i << "\n";
}
View Pudges exercise
#!/usr/bin/env python3
for n in range(1000, 10000):
s = str(n)
result = (int(s[:2]) + int(s[2:])) ** 2
if n == result:
print(n)
exit(0) # actually it's unnecessary
@nwg-piotr
nwg-piotr / amdgpu-pro log
Created Apr 18, 2020
This is what it looks like with amdgpu-pro.libl installed
View amdgpu-pro log
[ 3.832] (--) Log file renamed from "/var/log/Xorg.pid-526.log" to "/var/log/Xorg.0.log"
[ 3.833]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 3.833] Build Operating System: Linux Arch Linux
[ 3.833] Current Operating System: Linux msi 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64
[ 3.833] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b6bdbe39-e79d-4e12-a07b-2b24b1e8d28a rw loglevel=3 quiet
[ 3.833] Build Date: 30 March 2020 05:05:45AM
[ 3.833]
[ 3.833] Current version of pixman: 0.38.4
@nwg-piotr
nwg-piotr / amdgpu-pro log
Created Apr 18, 2020
This is what it looks like with amdgpu-pro.libl installed
View amdgpu-pro log
[ 3.832] (--) Log file renamed from "/var/log/Xorg.pid-526.log" to "/var/log/Xorg.0.log"
[ 3.833]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 3.833] Build Operating System: Linux Arch Linux
[ 3.833] Current Operating System: Linux msi 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64
[ 3.833] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b6bdbe39-e79d-4e12-a07b-2b24b1e8d28a rw loglevel=3 quiet
[ 3.833] Build Date: 30 March 2020 05:05:45AM
[ 3.833]
[ 3.833] Current version of pixman: 0.38.4
View xorg.log
[ 3.608] (--) Log file renamed from "/var/log/Xorg.pid-523.log" to "/var/log/Xorg.0.log"
[ 3.609]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 3.609] Build Operating System: Linux Arch Linux
[ 3.609] Current Operating System: Linux msi 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64
[ 3.609] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b6bdbe39-e79d-4e12-a07b-2b24b1e8d28a rw loglevel=3 quiet
[ 3.609] Build Date: 30 March 2020 05:05:45AM
[ 3.609]
[ 3.609] Current version of pixman: 0.38.4
View Xorg.0.log
[ 3.634] (--) Log file renamed from "/var/log/Xorg.pid-521.log" to "/var/log/Xorg.0.log"
[ 3.635]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 3.635] Build Operating System: Linux Arch Linux
[ 3.635] Current Operating System: Linux msi 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64
[ 3.635] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b6bdbe39-e79d-4e12-a07b-2b24b1e8d28a rw loglevel=3 quiet
[ 3.635] Build Date: 30 March 2020 05:05:45AM
[ 3.635]
[ 3.635] Current version of pixman: 0.38.4
@nwg-piotr
nwg-piotr / main.py
Last active Jan 16, 2020
This snippet uses i3ipc python module to print dimensions of just focused container
View main.py
#!/usr/bin/env python3
from i3ipc import Connection, Event
i3 = Connection()
def print_dimensions(i3, e):
try:
con = i3.get_tree().find_focused()
@nwg-piotr
nwg-piotr / nsort.py
Last active May 7, 2019
Python script to sorts the `names.txt` file containing lines like `Name Surname` alphabetically by Surname and write the result to the `names_sorted.txt` file.
View nsort.py
#!/usr/bin/env python
# _*_ coding: utf-8 _*_
"""
This script sorts the `names.txt` file containing lines like `Name Surname` alphabetically by Surname
and writes result to the `names_sorted.txt` file.
"""
import sys