aliases

making a commandline alias to a python file in a pipenv project

被刻印的时光 ゝ 提交于 2019-12-04 01:48:56
问题 I've been making a python project using pipenv, and I want to be able to run it in a terminal from any location on my (linux) system. Specifically, say I have the following directory structure: /home /project Pipfile main.py /other_dir I would like to be able to make an alias that allows me to call main.py like so: /home/other_dir$ alias_to_my_proyect --some args and run it in the virtual env, having the same behaviour as /home/project$ pipenv run python main.py But in another directory. If

mysql: referring to columns by numbers

别来无恙 提交于 2019-12-02 13:20:38
I want to give columns aliases without knowing their names, but only their number in the table. Something like this: select firstColumn as myId, secondColumn as myName, thirdColumn as myLastName where I don't know the actual names of the columns (I understand that the need sounds strange. And yes I can know the names of the columns. This is a technical question, please answer if you know the technical answer, regardless of the motivation. Thank you!) The closest you could do is use INFORMATION_SCHEMA.COLUMNS to find the column name from the ordinal position. I realize this isn't what you asked

Zshell aliases like !gst inside vim?

雨燕双飞 提交于 2019-12-01 15:39:42
问题 Is there a way to run my zshell aliases inside vim, with the output going to a new split? I'm using oh-my-zsh's git aliases like gst , and I am unable to do :!gst inside vim. Thanks 回答1: Try :set shell=zsh\ -l And put the alias setting to ~/.zshenv Here is the similar question terminal vim not loading .zshrc. 回答2: @tim-green is right! As the man page says: Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login shell, commands are read from /etc/zprofile and then $ZDOTDIR/

making a commandline alias to a python file in a pipenv project

久未见 提交于 2019-12-01 09:43:18
I've been making a python project using pipenv, and I want to be able to run it in a terminal from any location on my (linux) system. Specifically, say I have the following directory structure: /home /project Pipfile main.py /other_dir I would like to be able to make an alias that allows me to call main.py like so: /home/other_dir$ alias_to_my_proyect --some args and run it in the virtual env, having the same behaviour as /home/project$ pipenv run python main.py But in another directory. If it weren't a pipenv project, I'd just use a shebang a the start of the file and then add an alias to it

How do you create “Aliases” in Apache Tomcat?

ぐ巨炮叔叔 提交于 2019-11-30 12:36:31
I am working on a web application that allows users to upload attachments. These attachments are stored on a different drive than that of the web application. How can I create an alias (equivalent to Apache HTTP server's aliases) to this drive so that users can download these attachments? Currently I am creating a context file and dumping it in CATALINA_HOME/conf/Catalina/localhost, but it gets randomly deleted every so often. The context file is named attachments.xml and the contents are shown below. I have also read about virtual hosts, but if I understand correctly, then a virtual host is

How do you create “Aliases” in Apache Tomcat?

☆樱花仙子☆ 提交于 2019-11-29 18:11:44
问题 I am working on a web application that allows users to upload attachments. These attachments are stored on a different drive than that of the web application. How can I create an alias (equivalent to Apache HTTP server's aliases) to this drive so that users can download these attachments? Currently I am creating a context file and dumping it in CATALINA_HOME/conf/Catalina/localhost, but it gets randomly deleted every so often. The context file is named attachments.xml and the contents are