Posts

Showing posts with the label Command Line

Cordova Run (in Real) Android Device Using Command Line?

Answer : You can force the run on device like this cordova run android --device If you get an error message like "No devices found" then make sure that you have developer mode and USB Debugging enabled on the device and also run adb kill-server and then adb devices should list your device and cordova run android --device should work For iOS you can run from macOS cordova run ios --device If it doesn't work, make sure you have ios-sim and ios-deploy installed and that you have your development certificate and a wildcard provisioning profile on your machine. You can open the .xcworkspace file on /platforms/ios/ and Xcode will help you to create the certificates and provisioning profiles when you try to run the app. If a real device is connected to your pc and it is recognized as well, you ca just use cordova run android and the app will start on your device. It worked for me.

Add Android-studio/bin/ To PATH Environmental Variable

Answer : It looks like you edited this code snippet: if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi which is included in ~/.profile by default. The answer which lead you to do so is confusing IMNSHO. I'd suggest that you change that code back to what it looked like before, and instead add a new line underneath it: if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi PATH="$PATH:/usr/local/Android/android-studio/bin" Then, next time you log in, PATH ought to be altered, whether $HOME/bin exists or not.

Bulk Crop Images From CMD/PowerShell

Answer : ImageMagick is a light-weight tool that can be used for this. Here is an example that croppes all jpg images in a directory and puts the results in a new folder: cd path/to/dir/ mogrify -crop +100+10 -quality 100 -path ../cropped *.jpg Here, 100 pixels from the left border and 10 pixels from the top are removed. See here for more information on how to use crop. Have you tried XnCovert? XnConvert is free cross-platform batch image processor, allowing you to combine over 80 actions. Compatible with 500 formats. It uses the batch processing module of XnViewMP and it is freeware and you can donate them if you find it useful. https://www.xnview.com/en/xnconvert/

7-Zip Doesn't Ask Me For A Password For A ZIP File I Encrypted While Double-clicking It

Answer : The ZIP format doesn't allow for encrypting file lists. This means that file lists are viewable by anyone. Only the contents of the files is encrypted, which means that no one can read the file without your password. Due to this, 7-Zip only asks for your password before unzipping. If you need a format that encrypts the file list, use 7Z and make sure you check "Encrypt File Names". For the more technical minded, the ZIP specification doesn't allow for encryption of the Central Directory. You will be prompted for a password when you try to extract the files. To simply view the contents of the archive does not require a password. If you would like to obfuscate the contents of the archive, compress the directory into an archive, and then compress that archive with a password. Thus, you will have to extract the archive with a password, to pull out the archived (and obfuscated) contents. A generalized solution that works for all zip programs (WI...

Call Ghostscript In Windows By Its Invocation Name?

Answer : There are several possibilities. To list the two most frequent ones: c:\full\path\to\gswin32c.exe should always work. For 64bit systems, use c:\full\path\to\gswin64c.exe . After a fresh installation using a standard windows installer, you may need to reboot before the updated %path% environment variable is used. Open a cmd window and (assuming your Ghostscript installation ended up in c:\path\to\gs ...) then type set path=c:\path\to\gs\gs9.02\bin;%path% . From this same cmd window you can now simply use gswin32c to start Ghostscript (use gswin64c on 64 bit Windows)...

Can Jconsole Data Be Retrieved From The Command Line?

Answer : jconsole just provides a wrapper around the JMX MBeans that are in the platform MBeanServer . You can write a program to connect to your VM using the Attach API which would then query the MBeans. Or you can expose the platform MBeanServer over RMI and query the MBeans that way. See the java.lang.management package for more info Maybe jvmtop is worth a look. It's a command-line tool which provides a live-view for several metrics. Example output of the VM overview mode: JvmTop 0.4.1 amd64 8 cpus, Linux 2.6.32-27, load avg 0.12 http://code.google.com/p/jvmtop PID MAIN-CLASS HPCUR HPMAX NHCUR NHMAX CPU GC VM USERNAME #T DL 3370 rapperSimpleApp 165m 455m 109m 176m 0.12% 0.00% S6U37 web 21 11272 ver.resin.Resin [ERROR: Could not attach to VM] 27338 WatchdogManager 11m 28m 23m 130m 0.00% 0.00% S6U37 web 31 19187 m.jvmtop.JvmTop 20m 3544m 13m 130m 0.93% 0.47% S6U37 web 20 16733 artup.Bootstrap 159m...

Convert YouTube DASH Audio (youtube-dl) To M4a (AAC DL)

Image
Answer : No, you need a second conversion step. The problem is that for YouTube DASH, the MP4 container's ftyp has the "major brand" set to dash instead of m4a . This is the correct approach for DASH streaming, but Winamp is too old to recognize it (and many other programs are). Now, what would be a reasonable suggestion is to create a feature request for youtube-dl to add post-processing support for ffmpeg to convert the major brand of the MP4 container to something more compatible. But at the moment, such a thing does not exist. Or, file a bug report for Winamp to include decoding support for dash brands. Since it's likely to rely on a third-party decoder plugin, this probably means raising a bug report somewhere else, too. youtube-dl 2015.01.23.4 and newer will automatically correct the header of the m4a file if ffmpeg is present on the system. Source: youtube-dl : Youtube m4a files downloaded with --extract-audio can't play in some players All you ha...

7-Zip Command Line: Extract Silently/quietly

Answer : 7-Zip does not have an explicit "quiet" or "silent" mode for command line extraction. A similar question over at Stack Overflow, Extracting a 7-Zip file "silently" - command line option , gives a possible solution using Python scripting code: One possibility would be to spawn the child process with popen, so its output will come back to the parent to be processed/displayed (if desired) or else completely ignored (create your popen object with stdout=PIPE and stderr=PIPE to be able to retrieve the output from the child). And then a similar question here on Super User, Redirect 7-Zip's command-line output to /dev/null on Windows when extracting a .7z file reports that the issue is mostly the output, and that by sending the output to NULL, you make the system run essentially silent: Try doing this: %COMSPEC% /c "%ProgramFiles%\7-Zip\7z.exe" ... Yes, it does support command line use. Open a command prompt and n...