command-line-interface

Unable to use heroku gem cli after password changes

柔情痞子 提交于 2019-12-03 06:55:26
问题 I changed my password via the web interface. And now I can't run any command that requires authentication. Password is using plain ASCII, nothing fancy, no Unicode, weird non-printable characters, etc. Anyone had similar experience and how you manage to resolve. How do I even begin to go about debug this? Any verbose cli option, log I can review? % sw_vers ProductName: Mac OS X ProductVersion: 10.6.8 BuildVersion: 10K549 % rvm --version rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>,

Find nginx version?

一世执手 提交于 2019-12-03 06:27:50
问题 I have installed nginx on Debian 7 with the following steps sudo apt-get update sudo apt-get upgrade sudo apt-get install nginx sudo service nginx start I have confirmed that this starts nginx by accessing the hostip from the browser. How do I find out the version of nginx? nginx -v fails with the ' command not found error I verified that nginx exists in the usr/sbin directory and that directory is added to the $PATH variable 回答1: It seems that your nginx hasn't been installed correctly. Pay

Why does `ionic run ios` error with “No matching provisioning profile found”?

时光毁灭记忆、已成空白 提交于 2019-12-03 06:12:01
My goal is to run my Ionic app on my iPhone. I don't figure out what could be the reason explaining this exception: myIonicApp$ sudo ionic run ios Check dependencies === BUILD TARGET WealCome OF PROJECT WealCome WITH CONFIGURATION Debug === Check dependencies Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “dabcc352-0b59-415a-bcd1-6f6ea1d1fbe6”, however, no such provisioning profile was found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1' I have this build settings: The

How can I perform a diff that ignores all comments?

 ̄綄美尐妖づ 提交于 2019-12-03 06:07:50
I have a large codebase that was forked from the original project and I'm trying to track down all the differences from the original. A lot of the file edits consist of commented out debugging code and other miscellaneous comments. The GUI diff/merge tool called Meld under Ubuntu can ignore comments, but only single line comments. Is there any other convenient way of finding only the non-comment diffs, either using a GUI tool or linux command line tools? In case it makes a difference, the code is a mixture of PHP and Javascript, so I'm primarily interested in ignoring // , /* */ and # . To use

How to read from stdin or from a file if no data is piped in Python?

折月煮酒 提交于 2019-12-03 05:53:10
问题 I have a CLI script and want it to read data from a file. It should be able to read it in two ways : cat data.txt | ./my_script.py ./my_script.py data.txt —a bit like grep , for example. What I know: sys.argv and optparse let me read any args and options easily. sys.stdin let me read data piped in fileinput make the full process automatic Unfortunately: using fileinput uses stdin and any args as input. So I can't use options that are not filenames as it tries to open them. sys.stdin.readlines

Search for files & file names using silver searcher

倾然丶 夕夏残阳落幕 提交于 2019-12-03 05:42:00
问题 Using Silver Searcher, how can I search for: (non-binary) files with a word or pattern AND all filenames , with a word or pattern including filenames of binary files. Other preferences: would like to have case insensitive search and search through dotfiles. Tried to alias using this without much luck: alias search="ag -g $1 --smart-case --hidden && ag --smart-case --hidden $1" 回答1: According to the man page of ag -G --file-search-regex PATTERN Only search files whose names match PATTERN. You

Start an apache server in any directory from command line

99封情书 提交于 2019-12-03 05:40:45
问题 I want to be able to start an apache server from the command line, typing something like apache site-folder or apache . --port=2000 This should read and use .htaccess files. I know about python -m SimpleHTTPServer and it's close to what I need, but not quite. Ideal solutions: Contributing a great command line interface to apache itself Writing a simple command line tool that wraps/contains apache (or something) Linking to docs on an existing cli for apache I just want to type command

Trying to Install AWS CLI, stuck on a step

我是研究僧i 提交于 2019-12-03 05:39:23
问题 Im trying to install aws for the mac command line, I guess I dont understand what I need to do I installed the aws bundle with wget on the terminal, unziped it did everything, but when I need to configure my credentials nothing comes up when I put aws configure.. Here are the Instructions: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html Here is what is ouputed an$ aws configuration Traceback (most recent call last): File "/usr/local/bin/aws", line 15, in <module>

Windows equivalent of the Mac OS X “open” command

馋奶兔 提交于 2019-12-03 05:08:31
Liu Chang asked a very similar question to this one here, Linux equivalent of the Mac OS X "open" command . Is there a windows equivalent for the Mac OS X "open" command. I'm trying to run a profiler that will open it's results, but it's looking for the "open" command. Basically, the command needs to open a file from the command prompt as if it were double-clicked on in explorer. The closest thing available is start . If its first argument is double-quoted, that argument is treated as a window title rather than a filename. Thus, to use it robustly, add an empty string as the first argument:

Python CLI program unit testing

旧巷老猫 提交于 2019-12-03 05:08:00
I am working on a python Command-Line-Interface program, and I find it boring when doing testings, for example, here is the help information of the program: usage: pyconv [-h] [-f ENCODING] [-t ENCODING] [-o file_path] file_path Convert text file from one encoding to another. positional arguments: file_path optional arguments: -h, --help show this help message and exit -f ENCODING, --from ENCODING Encoding of source file -t ENCODING, --to ENCODING Encoding you want -o file_path, --output file_path Output file path When I made changes on the program and want to test something, I must open a