What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-14 00:14:02
php change date format
To convert the date-time format PHP provides strtotime() and date() function. We change the date format from one format to another. Change YYYY-MM-DD to DD-MM-YYYY <? php. $currDate = "2020-04-18"; $changeDate = date("d-m-Y", strto... Add solution -
Shell/Bash 2021-09-13 17:23:02
jq for html
Install pup command for structuring in html format outputs into lines: brew install pup Then you can use pup command to split, parse or wrap html outputs: cat file.html | pup #html is parsed into an optimally visible format cat file.html | pup 'span#See_a... Add solution -
Python 2021-09-12 06:52:01
pytest logcli to write to file
[pytest] log_cli = 1 log_cli_level = CRITICAL log_cli_format = %(message)s log_file = pytest.log log_file_level = DEBUG log_file_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s) log_file_date_format=%Y-%m-%d %H:%M:%S Add solution -
Shell/Bash 2021-09-10 21:18:02
shell script current time
#!/bin/bash now="$(date)" printf "Current date and time %s\n" "$now" now="$(date +'%d/%m/%Y')" printf "Current date in dd/mm/yyyy format %s\n" "$now" echo "Starting backup at $... Add solution