How to get a list of sub-folders and their files, ordered by folder-names

How about using sort? dir /b /s | sort Here’s an example I tested with: dir /s /b /o:gn d:\root0 d:\root0\root1 d:\root0\root1\folderA d:\root0\root1\folderB d:\root0\root1\file00.txt d:\root0\root1\file01.txt d:\root0\root1\folderA\fileA00.txt d:\root0\root1\folderA\fileA01.txt d:\root0\root1\folderB\fileB00.txt d:\root0\root1\folderB\fileB01.txt dir /s /b | sort d:\root0 d:\root0\root1 d:\root0\root1\file00.txt d:\root0\root1\file01.txt d:\root0\root1\folderA d:\root0\root1\folderA\fileA00.txt d:\root0\root1\folderA\fileA01.txt d:\root0\root1\folderB d:\root0\root1\folderB\fileB00.txt d:\root0\root1\folderB\fileB01.txt To just get directories, use the /A:D parameter: dir /a:d /s … Read more

Debugging php-cli scripts with xdebug and netbeans?

I got this working on Ubuntu/Netbeans by: copying the xdebug config lines from the /etc/php5/apache2/php.ini file into /etc/php5/cli/php.ini setting an environment variable with the name of the debug session (you can get this from the query string in the url of the page netbeans launches when you start debugging) so the command is: export XDEBUG_CONFIG=”idekey=netbeans-xdebug” … Read more

Displaying output of a remote command with Ansible

I’m not sure about the syntax of your specific commands (e.g., vagrant, etc), but in general… Just register Ansible’s (not-normally-shown) JSON output to a variable, then display each variable’s stdout_lines attribute: – name: Generate SSH keys for vagrant user user: name=vagrant generate_ssh_key=yes ssh_key_bits=2048 register: vagrant – debug: var=vagrant.stdout_lines – name: Show SSH public key command: … Read more

Enter export password to generate a P12 certificate

OpenSSL command line app does not display any characters when you are entering your password. Just type it then press enter and you will see that it is working. You can also use openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12 -password pass:YourPassword to pass the password YourPassword from command line. Please take a … Read more

How to animate the command line?

One way to do this is to repeatedly update the line of text with the current progress. For example: def status(percent): sys.stdout.write(“%3d%%\r” % percent) sys.stdout.flush() Note that I used sys.stdout.write instead of print (this is Python) because print automatically prints “\r\n” (carriage-return new-line) at the end of each line. I just want the carriage-return which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)