command-line-interface

How to enable 'openssl' in UwAmp CLI?

痴心易碎 提交于 2020-01-23 12:05:40
问题 i have UwAmp installed. and i'm using php cli command with composer, it says 'you must enable openssl extension'. i'm sure i was enabled openssl in all php ini every version i have. how to enable openssl for uwamp cli? 回答1: I had the same problem using UwAmp whilst trying to install composer, but found that I needed to add one more step before I could get it to work on my system. After you identify the php_uwamp.ini file and copy it to the same directory as php.ini (as suggested) you need to

How to enable 'openssl' in UwAmp CLI?

浪尽此生 提交于 2020-01-23 12:04:17
问题 i have UwAmp installed. and i'm using php cli command with composer, it says 'you must enable openssl extension'. i'm sure i was enabled openssl in all php ini every version i have. how to enable openssl for uwamp cli? 回答1: I had the same problem using UwAmp whilst trying to install composer, but found that I needed to add one more step before I could get it to work on my system. After you identify the php_uwamp.ini file and copy it to the same directory as php.ini (as suggested) you need to

Why are both “true” and “false” tests true?

不想你离开。 提交于 2020-01-22 16:21:07
问题 The words "true" and "false" are special words (builtins) for bash. If used in an if test, they act as intuitively expected: $ if true; then echo "true"; else echo "false"; fi true $ if false; then echo "true"; else echo "false"; fi false However, this two tests: $ [[ true ]] && echo "true" || echo "false" true $ [[ false ]] && echo "true" || echo "false" true Both result in true. Why? 回答1: [[ … ]] is, in this case, equivalent to test , i.e. test true and test false . Looking at the manual

Error: Got unexpected extra argument (main-func)

拟墨画扇 提交于 2020-01-22 02:32:40
问题 I'm trying to call a function from a package module inside the command of click group. But, getting the following error: Error: Got unexpected extra argument (main-func) Updated: Let say I have a package that contains a module mod.py . The module has a click command mod_func that 'll take user input and print & return it. The package is initialized with importing the command from the module. Next, I want to import the package inside another module, let's say tool.py , and want to call mod

Jenkins CLI: using Anonymous permissions instead of the user defined ones

眉间皱痕 提交于 2020-01-17 01:39:29
问题 I am getting mad with this problem and I have no idea how to solve it. We are trying to trigger Jenkins builds from hooks on a Windows Central repository. This is actually working on an old Jenkins server (LTS 1.580.1). The way we did it before was calling Jenkins CLI with the SSH private key stored on a file. Here is the weird thing: C:\Users\Username\jenkins>java -jar jenkins-cli.jar -s http://hostname:8080 -i ci.key list-jobs hudson.security.AccessDeniedException2: jenkins_ci is missing

ES6 import gives Unexpected Identifier SyntaxError when running on terminal

旧时模样 提交于 2020-01-16 19:24:10
问题 I am new to the whole ES6 concept and I am currently trying to use the export and import modules. I have a simple code that just log s something to the console . Below are the codes autoincrementId.js export default function autoincrementId() { return 'hey'; } log.js import autoincrementId from '../helpers/autoincrementId.js'; console.log(autoincrementId()); When I run my code with node on the terminal, I get this error The autoinrementId stands as the printOut in the error When I use the

PHP - execute web script as command line script?

风格不统一 提交于 2020-01-16 18:48:47
问题 Using PHP version 5.4.28, what I'm trying to accomplish is: A facebook app I have is script "otherevent.php". It should not be publicly visible to any user. It is a backend app that is on the web server, due to Facebook requiring it to have a web address, and the app is run and managed by other scripts. The first script I have to run and manage the app is called "app.php". Ideally all it's supposed to do is execute "otherevent.php", get the output, and echo the output to the screen. Craziness

Instantiate Foo() class on main click group command by running subcomand with Foo() arguments

不打扰是莪最后的温柔 提交于 2020-01-16 05:11:07
问题 I want to run a click subcommand with variadic arguments that are going to be used to instantiate a class Foo(*args) on main() group command in order to create an instance of Foo() to be used by its subcommands so that it aligns with the way click works: $ python foo.py subcommand arg1 arg2 ... argN This question is based on my initial question and @StephenRauch answer. import click class Foo(object): def __init__(self, *args): self.args = args def log(self): print('self.args:', self.args)

Class imagick not found when ran from CLI

好久不见. 提交于 2020-01-15 11:54:49
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php

Class imagick not found when ran from CLI

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 11:54:37
问题 $im = new imagick($file); This line of code will work fine when ran from my browser, but when I try to run it from command line (CLI) then I get the following error... Class 'imagick' not found Any ideas why it won't work from CLI? 回答1: Found a solution: sudo aptitude install make php5-dev php-pear sudo aptitude remove php5-imagick sudo aptitude install libmagick9-dev sudo pecl install imagick sudo /etc/init.d/apache2 restart http://kvz.io/blog/2008/02/27/class-imagick-not-found/ 回答2: The php