From c67580c1c71cd8502f387b402eda89551e362e86 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Fri, 26 Feb 2021 19:01:09 +0100 Subject: [PATCH] Added new installation packages --- Raspberry Pi/first_install.sh | 9 +++-- .../customizations/vim-emmet-mysnippets.json | 36 ++++++++----------- dotfiles/.vimrc | 5 +++ 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Raspberry Pi/first_install.sh b/Raspberry Pi/first_install.sh index 7f25a7b..ec3f866 100644 --- a/Raspberry Pi/first_install.sh +++ b/Raspberry Pi/first_install.sh @@ -1,7 +1,7 @@ apt-get update apt-get upgrade -apt-get install python3 vim-nox tmux nano zsh git autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm apticron tidy +apt-get install python3 vim-nox tmux nano zsh git autossh mosh sshuttle fail2ban avahi-daemon ufw lynx npm apticron tidy nmon python-pip python3-pip ufw allow ssh @@ -11,4 +11,9 @@ pip3 install requests bs4 prospector black isort npm install -g jsonlint -npm install -g fixjson \ No newline at end of file +npm install -g fixjson + + + +# cups remote administration: +# sudo cupsctl --remote-admin \ No newline at end of file diff --git a/dotfiles/.vim/customizations/vim-emmet-mysnippets.json b/dotfiles/.vim/customizations/vim-emmet-mysnippets.json index bb91613..c1af6a3 100644 --- a/dotfiles/.vim/customizations/vim-emmet-mysnippets.json +++ b/dotfiles/.vim/customizations/vim-emmet-mysnippets.json @@ -1,28 +1,22 @@ { - "variables": { - "pythonversion": "python3", - "encoding": "utf-8" - }, + "variables": { + "pythonversion": "python3", + "encoding": "utf-8" + }, "python": { "snippets": { - "py3": "#!/usr/bin/${pythonversion}\n# -*- coding: ${encoding} -*-\n\n\n${cursor}\n\n\ndef main():\n\tpass\n\n\nif __name__ == \"__main__\":\n\tmain()\n", - "fopen" : "def openfile(filepath):\n\twith open(filepath, \"r\", encoding=\"${encoding}\") as currentfile:\n\t\treturn currentfile.readlines()\n\n\n", - "fsave" : "def savefile(filepath, newcontent):\n\twith open(filepath, \"w\", encoding=\"${encoding}\") as currentfile:\n\t\tcurrentfile.writelines(newcontent)\n\n\n", - "basepath" : "", - "parameter": "", - "class": "", - "config": "def openconfig(configfile):\n\twith open(configfile, \"r\", encoding=\"utf-8\") as currentconfigfile:\n\t\treturn json.load(currentconfigfile)\n\n\ndef saveconfig(configfile, newcontent):\n\twith open(configfile, \"w\", encoding=\"utf-8\") as currentconfigfile:\n\t\tjson.dump(newcontent, currentconfigfile, indent=4, sort_keys=True)"} - }, + "py3": "#!/usr/bin/${pythonversion}\n# -*- coding: ${encoding} -*-\n\nimport os\nimport sys\n\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\n\n${cursor}\n\n\ndef main():\n\tpass\n\n\nif __name__ == \"__main__\":\n\tmain()\n", + "fopen": "def openfile(filepath):\n\twith open(filepath, \"r\", encoding=\"${encoding}\") as currentfile:\n\t\treturn currentfile.readlines()\n\n\n", + "fsave": "def savefile(filepath, newcontent):\n\twith open(filepath, \"w\", encoding=\"${encoding}\") as currentfile:\n\t\tcurrentfile.writelines(newcontent)\n\n\n", + "basepath": "", + "parameter": "", + "class": "", + "config": "def openconfig(configfile):\n\twith open(configfile, \"r\", encoding=\"utf-8\") as currentconfigfile:\n\t\treturn json.load(currentconfigfile)\n\n\ndef saveconfig(configfile, newcontent):\n\twith open(configfile, \"w\", encoding=\"utf-8\") as currentconfigfile:\n\t\tjson.dump(newcontent, currentconfigfile, indent=4, sort_keys=True)" + } + }, "java": { "snippets": { - "class": "" + "class": "\npublic class ${id} {\n\tpublic static void main (String[] args){\n\t\t${cursor}\n\t}\n\n}\n" } - } - + } } - - - - - - diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index b98e218..1a18f8e 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -313,6 +313,11 @@ let g:ale_fixers = {'python': ['isort', 'black'], \'java': ['uncrustify']} +" Install the linter and fixer for a specific language automatically + +command InstallLinterFixPython python3 import pip; [pip.main(["install", singlepackage, "--user"]) for singlepackage in "flake8 pylint mypy prospector black isort".split(" ")] + + " colorscheme toggle: function! s:SwitchColorscheme()