Skip to content

Instantly share code, notes, and snippets.

@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@4np
4np / GNU Screen long login names on Mac.md
Last active February 24, 2022 16:55
GNU Screen for Mac, patched to allow long loginNames

GNU Screen is a virtual console multiplexer, and it has long been available on Mac. However, it was developed with login names of 20 characters or less in mind. Nowadays it is possible that login names actually exceed the 20 character limit (for example when using Active Directory), resulting in Screen quiting with the nice error message LoginName too long - sorry and rendering Screen useless on these Macs.

Below are the steps to download, patch and compile screen yourself to allow login names of up to 255 characters.

$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/screen co screen
$ cd screen/src
$ curl "https://raw.github.com/pclouds/pclouds-overlay/master/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch"|patch
$ for x in Makefile.in config.h.in configure process.c pty.c screen.cc windows.c; do 
  curl "http://www.opensource.apple.com/source/screen/screen-16/patches/${x}.diff?txt" | patch