command-line-interface

Downloading composer via PHP script

我的梦境 提交于 2019-12-06 09:21:49
I have a php script which downloads the composer.phar. After it has downloaded I run exec() to install the packages. Folder structure is --ROOT --public --composer.josn However, when I run exec('php composer.phar install -d ' . dirname(__DIR__), $out, $return); I get an output of: array(5) { [0]=> string(39) "All settings correct for using Composer" [1]=> string(14) "Downloading..." [2]=> string(0) "" [3]=> string(80) "Composer successfully installed to: /var/www/projects/funny/public/composer.phar" [4]=> string(25) "Use it: php composer.phar" } And the vendor packages aren't installed. Just

Unable to install plugins in cordova project

对着背影说爱祢 提交于 2019-12-06 08:22:23
问题 Am facing a big issue : Unable to install the phonegap plugins in my cordova project.Actually it was working fine still yesterday. Now whenever I try adding any cordova plugin using CLI in my cordova project. I get the following error; D:\Projects\test cordova>cordova plugin add org.apache.cordova.network-information Fetching plugin "org.apache.cordova.network-information" via plugin registry npm http GET http://registry.cordova.io/org.apache.cordova.network-information npm http 502 http:/

Why does PHP built-in web server not serve file called é.txt (on Windows)

一世执手 提交于 2019-12-06 07:28:18
I'm on Windows 7 If I have a directory containing my file é.txt and I start the built-in web server in that directory php -S localhost:8000 then, using my web browser, I request the URL http://localhost:8000/é.txt the web server responds Not Found The requested resource /%C3%A9.txt was not found on this server. Alastair McCormack PHP's Windows filesystem support is broken - it does not properly translate to the native encoding. See How do I use filesystem functions in PHP, using UTF-8 strings? 来源: https://stackoverflow.com/questions/33150112/why-does-php-built-in-web-server-not-serve-file

Move printing position of Command Line Interface in Java without using External library

瘦欲@ 提交于 2019-12-06 06:39:02
In C, I recalled that I can move the invisible caret around the command line interface screen with respect to the line and character position, meaning I can make the program print any text anywhere on the screen. Do we have such command in Java? For instance, here is a pseudocode in C: int main(){ printf("launching program\n"); moveTo(4,3); //move to line 4 at character index 3 on the screen. printf("AAA"); moveTo(3,0); //move to line 3 at character index 0 on the screen. printf("BBB"); moveTo(2,1); //move to line 2 at character index 1 on the screen. printf("CCC"); return 0; } This will give

Mac OS : Install vue cli does work properly

一世执手 提交于 2019-12-06 05:31:20
问题 I installed vue-cli running the following command: npm install -g @vue/cli /Users/me/npm/bin/vue -> /Users/me/npm/lib/node_modules/@vue/cli/bin/vue.js /Users/me/npm/lib └── @vue/cli@3.0.0-rc.3 When I run vue init, get an the error: "command not found": vue init webpack vue-app -bash: vue: command not found vue-cli does not seem to be in my PATH. When I check the PATH, it includes the directory /Users/me/npm/lib. Here is the result of echo $PATH /usr/local/git/bin:/Users/me/npm/bin/ng:/Users

How to add chapters into mp4/mkv file using ffmpeg?

家住魔仙堡 提交于 2019-12-06 03:28:26
Currently i'm using MKVToolNix for my needs which is fine but i would prefer some CLI also. As far as i know ffmpeg supports chapters management. The ffmetadata format allows you to add chapters to a file. Have a look at https://ffmpeg.org/ffmpeg-formats.html#Metadata-1 for an example. cippu_lux Sorry maybe I'm not clear, and editing the answer I have messed up worst. I'm not English. Like Alex Zubkov I want add chapters to video with ffmpeg via cmd. The instruction in the page linked by MRousse don help me at all, but help me to solve 1st problem: Problem file was not in UTF-8. Problem was

visual selection in bash / cli

ⅰ亾dé卋堺 提交于 2019-12-06 03:23:29
问题 Is there a way to make bash use visual selections for text replacement ? Standard text input conventions don't work: If you press Shift+Left Arrow, the character to the left should be visually selected If you press Ctrl+Left Arrow, the cursor should move to the beginning of the previous word If you press Shift+Ctrl+Left Arrow, the word to the left should be visually selected If you visually select some text then press any key, the text should be replaced with the text of the key you press Vi

PHP cli command line safe_mode restriction

馋奶兔 提交于 2019-12-06 03:13:04
I'm using the Kohana framework (3.0.9), which generates daily logs. I want to mail the log file if one was made the day before CRON runs the script, but after days trying I can't figure out how to put off safe_mode in PHP CLI modus. When I'm running my script on the web, there is no problem. But I want to run the script as a CRON task on my Plesk 9.5.2 server (or on the command line as root user) I'm getting the following error: ErrorException [ 2 ]: dir(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/mydomain.com/subdomains

Inspect network traffic from simple linux cli app

我与影子孤独终老i 提交于 2019-12-06 02:18:27
I'm running a small app on the command line, and I'm trying to watch the (http) network traffic it creates. Is there some kind of wrapper program (like 'time', or 'watch') which can display all network traffic to and from my app? (Or at least, make a copy of it in a file) Use tcpdump in command line or wireshark in desktop. For example, to capture web traffic. tcpdump -s0 -i any -wfile.pcap port 80 To watch it directly remove the -wfile.pcap To read a previously saved file tcpdump -r file.pcap However for web traffic if you are interested of watching the http flow as it comes I like to use

How to build interactive menu for command-line application in python? [closed]

拟墨画扇 提交于 2019-12-06 00:30:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I've been working with click to make a command line program. Right now I'm implementing interactive menus in a very textual way. for example: 1-option #1 2-option #2 Enter the index of the option you want to select: But I would love to do this in a more elegant and interactive way. For example, I love the way