echo defaults to include a newline character at the end of the string, which messes with the hash. If you suppress it with -n then it has the same effect as PHP's ?echo md5("string"), "\t-";? Even more, by using cut you get the exact same output, so it works as a drop-in replacement for the original command for this thread. Show Sample Output
Pipe serialized data into the command.
List all dependencies manifests so you can install them. In a scenario where you want to deploy a number of web applications and run their dependency managers, how could you run all of them in a systematic order. One of the complexity is to ensure you get only your own top level dependencies. That way, you don recursively call development dependencies of your own dependencies. Otherwise you might end up discovering dependency management manifests that are already been pulled by your own projects. # Using this command This command helps me find them and I can then run what?s required to pull them from their respective sources. This command assumes the following: 1. Your code checkouts are in a flat repository layout (i.e. not nested). 2. Finds manifests for: - NPM (nodejs), - Composer (php), - bower, - requirements.txt (Python), and - git submodules Show Sample Output
I still don't know why mutt (or offlineimap or whatever in between), is borking the encoding of my files, but this fixes it. Show Sample Output
Command to run unit tests when source or test files changed.
If this matches any files on your web server expect to find allot of malware spread throughout your server folders. Seems to target wordpress sites. Be sure to check your themes/theme-name/header.php files manually for various redirect scripting usually in the line right above the close head tag. Good luck! Show Sample Output
New objects cannot be assigned by reference. The result of the new statement can no longer be assigned to a variable by reference. Check the "Sample Output" example ("sample.php"). The Output of the above example in PHP 5: "Deprecated: Assigning the return value of new by reference is deprecated in sample.php on line 3". Output of the above example in PHP 7: "Parse error: syntax error, unexpected 'new' (T_NEW) in sample.php on line 3. Show Sample Output
needs grep what supports '--recursive' Show Sample Output
Strips comments from at least bash and php scripts. Normal # and // as well as php block comments
removes all of the:
empty/blank lines
lines beginning with #
lines beginning with //
lines beginning with /*
lines beginning with a space and then *
lines beginning with */
It also deletes the lines if there's whitespace before any of the above.
Add an alias to use in .bashrc like this:
alias stripcomments="sed -e '/^[[:blank:]]*#/d; s/[[:blank:]][[:blank:]]*#.*//' -e '/^$/d' -e '/^\/\/.*/d' -e '/^\/\*/d;/^ \* /d;/^ \*\//d'"
Install php-tidy Module / Extension
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: