Sử dụng hệ điều hành Ubuntu 20.04 LTS. Sau đó cài đặt Docker, Git command line:
sudo apt-get update && sudo apt-get install -y git
curl -L get.docker.com | sudo bash && sudo apt install docker-compose -y
// Function to format a number as currency | |
function formatCurrency(amount, currencyCode) { | |
return new Intl.NumberFormat('vi-VN', { | |
style: 'currency', | |
currency: currencyCode, | |
}).format(amount); | |
} | |
// Function to fetch data from a URL and handle errors | |
async function fetchData(url) { |
[ | |
"https://datuan.dev", | |
"https://google.com" | |
] |
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//datuan.dev/main-sitemap.xsl"?> | |
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<url> | |
<loc>https://datuan.dev/</loc> | |
</url> | |
<url> | |
<loc>https://datuan.dev/backlog/thang-12-kubernetes-azdigi-lvh/</loc> | |
<lastmod>2021-12-06T22:10:46+07:00</lastmod> | |
<image:image> |
if ('loading' in document.createElement('img')) { | |
document.querySelectorAll('[loading="lazy"]').forEach(elem => { | |
if (elem.dataset.src) { | |
elem.src = elem.dataset.src; | |
} | |
if (elem.dataset.srcset) { | |
elem.srcset = elem.dataset.srcset; | |
} | |
}) | |
} else { |
#!/bin/bash | |
DOMAIN=$1 | |
scan_sitemap () { | |
[ -z "$1" ] && URL="https://$DOMAIN/sitemap.xml" || URL=$1 | |
curl -L --compressed $URL 2>/dev/null | grep -Eo "http(s?):\/\/$DOMAIN[^ \"\'()\<>]+" | while read line; do | |
if [[ $line = *.xml ]] | |
then | |
echo "👉 Sitemap $line" |
FROM php:5.6-apache | |
RUN a2enmod rewrite | |
# install the PHP extensions we need | |
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* \ | |
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | |
&& docker-php-ext-install gd | |
RUN docker-php-ext-install mysqli | |
RUN docker-php-ext-install pdo php_pdo |
#!/bin/bash | |
# Your DDNS hostname or static IP | |
HOSTNAME="xxx.xxx.xxx.xxx" | |
# Username on source server | |
USER="root" | |
# Your camera MAC address | |
CAMERA_MAC="7811DCCCXXXX" | |
DATE=`/bin/date +%Y%m%d%H` |
if ( is_category( array(1, 2, 3) ) ) { | |
// Do something | |
} else { | |
// Do something else | |
} |
#!/bin/bash | |
# | |
# Written by AC - 2015 <[email protected]> - sys0dm1n.com | |
# | |
URL=$1 | |
wget --quiet http://$URL/sitemap.xml --no-cache --output-document - | egrep -o "http(s?)://$URL[^ \"\'()\<>]+" | while read line; do | |
if [[ $line == *.xml ]] | |
then | |
newURL=$line |