Skip to content

Instantly share code, notes, and snippets.

@krkhan
krkhan / polybar-i3-skip-ws.patch
Last active February 21, 2023 22:15
hidden workspaces
diff --git a/src/modules/i3.cpp b/src/modules/i3.cpp
index 383a39f..e16d2ab 100644
--- a/src/modules/i3.cpp
+++ b/src/modules/i3.cpp
@@ -160,6 +160,15 @@ namespace modules {
// Trim leading and trailing whitespace
ws_name = string_util::trim(move(ws_name), ' ');
+ if (ws_name.back() == '_' && !ws->visible) {
+ continue;
@bellbind
bellbind / ecc.py
Created December 1, 2011 08:08
[python]basics of elliptic curve cryptography
# Basics of Elliptic Curve Cryptography implementation on Python
import collections
def inv(n, q):
"""div on PN modulo a/b mod q as a * inv(b, q) mod q
>>> assert n * inv(n, q) % q == 1
"""
for i in range(q):
if (n * i) % q == 1: