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 | |
# How to modify to use various AUR helpers: | |
# EITHER check regular repos, then AUR with trizen: | |
upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/trizen -Qqu -a") | |
# or with yaourt: | |
#upd=$(/bin/sh -c "(/usr/bin/checkupdates; /usr/bin/yaourt -Qu -a | cut -c 5-) | sort -u -t' ' -k1,1") | |
# or pacaur: | |
#upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/pacaur -Qqu -a") | |
# or aurman: | |
#upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/aurman -Qqu") |
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
<keybind key="XF86MonBrightnessDown"> | |
<action name="Execute"> | |
<command>obhud --brightness down</command> | |
</action> | |
</keybind> | |
<keybind key="XF86MonBrightnessUp"> | |
<action name="Execute"> | |
<command>obhud --brightness up</command> | |
</action> | |
</keybind> |
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 | |
# _*_ 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 | |
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 | |
from i3ipc import Connection, Event | |
i3 = Connection() | |
def print_dimensions(i3, e): | |
try: | |
con = i3.get_tree().find_focused() |
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
[ 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 |
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
[ 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 |
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
[ 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 |
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
[ 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 |
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 | |
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 |
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
#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"; | |
} |
OlderNewer