Skip to content

Instantly share code, notes, and snippets.

@djcoin
djcoin / simple_ftp.py
Created February 26, 2014 08:29
Simple FTP
from pyftpdlib import ftpserver
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user("a", "a", "/tmp", perm="elradfmw")
authorizer.add_anonymous("/tmp")
handler = ftpserver.FTPHandler
handler.authorizer = authorizer
address = ("0.0.0.0", 21)
nix-shell -p libffi openssl
nix-env -i nodejs
mkdir ~/.mutable_node_modules
npm config set prefix '~/.mutable_node_modules'
# add bin to .bashrc
vim .bashrc
mkdir bin
ln -s ~/.mutable_node_modules/bin/ ~/bin
; switch between keyboards usingby pressing both shift keys
; http://kbd-intl.narod.ru/images/ru-typewriter.png
setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll fr,ru
@djcoin
djcoin / diagrams_kroki_api.livemd
Created February 17, 2022 13:29
Generate many types of diagrams in Livebook w/ Kroki API