PROJ=factotum ; git log ^staging dev | sed -E 's/'$PROJ'-[0-9]+/\n&\n/gI' | sed -En '/'$PROJ'-[0-9]+/I p' | tr a-z A-Z | sort -u | sed 's%.*%https://jira.example.com/browse/&%'
If you're requirements.txt file is the output of pip freeze
then it's really
a lock file, not a list of project dependencies. To get just the actual
dependencies:
find . -name \*.py -type f | xargs sed -En '/^(import|from)/ {s/\S+ //; s/ .*//; s/\..*//; p}' | sort -u >reqs
This extracts foo
from all import foo.bar...
and from foo.bar import...
lines, dropping
local imports (starting with '.').
Update: works with 24.04(beta) too, and problem still exists in 24.04.
This is how I got the Citrix Workspace client to run in Ubuntu 23.10 in Jan. 2024
Prior to version 2311 Citrix client, this patch was unnecessary, but at 2311 Citrix stopped launching successfully at all in i3.
In XFCE Citrix runs with "proper" full screen support, covering three monitors but
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
# TNB mods | |
# bind -n == bind -T root == no prefix | |
set -g lock-after-time 0 # Seconds; 0 = never | |
bind -n C-Left select-window -p | |
bind -n C-Right select-window -n | |
bind -n M-S-Left swap-window -t -1 | |
bind -n M-S-Right swap-window -t +1 | |
bind C-a select-window -l |
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
# Fix ERROR: readlink /data/docker/overlay2/l/7M5EN7M5OUETAW42LC63NZBNJA: no such file or directory errors | |
docker image ls | while read row; do | |
image_id=$(echo $row | sed -E 's/^(\S+\s+){2}(\S+).*/\2/') | |
docker inspect --format='{{.GraphDriver.Data.MergedDir}}' $image_id || \ | |
(echo -e "Broken image:\n$row"; echo docker image rm $image_id) | |
done |
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 | |
"""Scans file to find folders on which ctags was originally run.""" | |
import subprocess | |
from pathlib import Path | |
dirs = set() | |
for line in Path("tags").open(): | |
if line.startswith("!"): | |
continue | |
# extract 'tests' from |
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
"""Three ways to read data from a stream. | |
Suggested input: | |
one | |
three | |
END | |
one | |
three | |
END |
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
from functools import partial, wraps, update_wrapper | |
from time import sleep | |
def partialize(func): | |
@wraps(func) | |
def _partial(*args, **kwargs): | |
part = partial(func, *args, **kwargs) | |
update_wrapper(part, func) | |
return part |
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
screen -X hardcopy $HOME/.tmp.err | |
sed 's/^ File "//; s/", line /:/; s/,.*/: -/' < $HOME/.tmp.err > $HOME/.tmp.cop | |
vim --remote-send '<Esc>:cexpr system("cat $HOME/.tmp.cop") | copen<CR>G' | |
screen -X select "vim --servername VIM" |
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
"""Restore window layout in Windows 10 | |
One way of launching, git bash script .sh file: | |
eval "$('/c/Users/username/pkg/miniconda/Scripts/conda.exe' 'shell.bash' 'hook')" | |
python "C:/Users/username/scripts/movewin.py" | |
""" | |
import win32gui | |
import re | |
POSITIONS = [ |
NewerOlder