You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a script is build for an older version of python flask following error might occur:
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
Fix this by using download_name instead of attachment_filename (see here)
Perlbrew
Install this handy management tool for perl installations, e.g. on Arch
sudo pacman -S perlbrew
perlbrew init
For cpan stuff
perlbrew install-patchperl
perlbrew install-cpanm
List perl versions available and install one
# List
perlbrew available
perl-x.yz.a
...
# Install
perlbrew install perl-x.yz.a
Make a specific version permanent or similar stuff
# Current
which perl
/usr/bin/perl
# List current used
perlbrew list
* perl-x.yz.a
perl-a.ab.c
# Switch version
perlbrew switch perl-a.ab.c
perlbrew use
Currently using perl-a.ab.c
which perl
/home/user/perlA/perlbrew/perls/perl-a.ab.c/bin/perl
Reinstall modules, e.g. when changing perl version
# Old version
perlbrew use perl-x.yz.a
# List all modules and install with new version (e.g. perl-a.ab.c)
perlbrew list-modules | perlbrew exec --with perl-a.ab.c cpanm
Troubleshooting
# Perl switch is not working permanentlyecho'source ~/perl5/perlbrew/etc/bashrc'>>~/.bash_profile
# Threaded perl needed (not a good idea ^^)
perlbrew install perl-a.ab.c -Dusethreads --as threaded-perl-a.ab.c
# Install crashes - check language
cat /etc/locale.conf
LC_MESSAGES=en_US.UTF-8
## Or just addecho'export LC_MESSAGES=en_US.UTF-8'>>~/.bashrc
Python Virtual Environment
When, e.g. using pip or just playing around and not f_ck up system python, use a virtual environment
Sometimes it would be great to have something like a before/after in Windows, e.g. when playing with netstat
# Shows one line before and one after match
netstat -anbo |Select-String-Context 1 testbinary
TCP 0.0.0.0:123450.0.0.0:0 ABHÖREN 7508> [testbinary.exe]
TCP 192.168.0.2:1390.0.0.0:0 ABHÖREN 4