412 karma · joined December 14, 2021
from functools import partial
class Pipeable:
def __init__(self, fn):
self.fn = fn
def __ror__(self, lhs):
return self.fn(lhs)
def pipeable(fn):
return lambda *args: Pipeable(partial(fn, *args))
filter = pipeable(filter)
map = pipeable(map)
list = pipeable(list)
sum = pipeable(sum)
min = pipeable(min)
max = pipeable(max)
any = pipeable(any)
# Usage:
range(1, 100) | filter(lambda x: x < 50) | max()
# 49
[1, 2, 3, 4] | filter(lambda x: x % 2 == 0) | map(lambda x: x * 3) | list()
# [6, 12]
[1, 2, 3, 4] | map(lambda x: x >= 5) | any()
# FalseProbably the main thing I'm missing from KDE is being able fo use Super+Number to switch between windows, i.e. Super+1 switches to the window at the first position in the taskbar, etc.. I've been searching around, but haven't found anything that'd be 100%. Would anyone happen to have a solution by any chance?
I recently gave the new Debian a try on my laptop, and I've been happy with it so far. I've also been pleasantly surprised that it's noticeably snappier than Ubuntu for some reason.
My main machine is still running Ubuntu, but when the time comes to reinstall or upgrade, especially if the snap situation becomes even worse, I will probably switch to Debian entirely.
I'm not a frontend developer and don't really know much about these frameworks, but how is this different from just using style="actual css"? This just feels like inline styles reinvented for whatever reason.
https://github.com/junegunn/fzf#key-bindings-for-command-lin...
Despite having VNC in its name, it isn't fully compliant with the VNC protocol and doesn't support regular VNC clients. Instead, it exposes a web client that you can access to connect to the machine. It also felt surprisingly snappy and nice to use compared to my previous experiences with regular VNC.
from functools import partial
class Pipeable:
def __init__(self, fn):
self.fn = fn
def __ror__(self, lhs):
return self.fn(lhs)
def pipeable(fn):
return lambda *args: Pipeable(partial(fn, *args))
filter = pipeable(filter)
map = pipeable(map)
list = pipeable(list)
sum = pipeable(sum)
min = pipeable(min)
max = pipeable(max)
any = pipeable(any)
# Usage:
range(1, 100) | filter(lambda x: x < 50) | max()
# 49
[1, 2, 3, 4] | filter(lambda x: x % 2 == 0) | map(lambda x: x * 3) | list()
# [6, 12]
[1, 2, 3, 4] | map(lambda x: x >= 5) | any()
# FalseIf you don't like the usual graphical git clients, but would like some help with some of the tasks that are tedious with just the cli, definitely give it a try.
The experience is still not as painless as effortless as VS Code, distribution or not, but it's definitely gotten a lot better than it used to be.
A Boolean represents a true/false value. Booleans are formatted as English words (“true”/“false”, “yes”/“no” or “on”/“off”) for readability and may be abbreviated as a single character “y”/“n” or “Y”/“N”.
Regexp: y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF
If you want a full-fledged modern DE with active development, the choice is only between GNOME and KDE imo.
>GTK or Qt
I used to worry about whether to go full GTK or Qt, these days I don't really care. Both work in either environment and the theming is usually consistent as well unless you have a custom theme, so they don't even look out of place.
>X11 or Wayland
It seems like Wayland is going to be the future, so it's only really a matter of whether it works well enough for your uses yet or not. If it does, great, use Wayland, if not, stick with X11 for a bit longer.
It honestly doesn't seem like that much of a mess to me.