Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from "react";
import "./App.css";
import Header from "../Header/Header";
import Footer from "../Footer/Footer";
import Section from "../Section/Section";
import Categories from "../Section/Categories";
import Trademark from "../Section/Trademark";
import Supplier from "../Section/Supplier";
import ProfileProduct from "../Section/ProductProfile";
import Cart from "../Cart/Cart";
@tronghuan98hd
tronghuan98hd / function.js
Last active May 7, 2020 03:58
view xem trước ảnh và có thể đổi tên
var selDiv = "";
document.addEventListener("DOMContentLoaded", init, false);
var selImg = -1;
var filesArr = [];
function init() {
document.querySelector('#file').addEventListener('change', handleFileSelect, false);
selDiv = document.querySelector("#selectedFiles");
}
@tronghuan98hd
tronghuan98hd / cloud.html
Created September 29, 2019 16:18
Cloud365
<!doctype html>
<head>
<link rel="stylesheet" type="text/css" href="themecloud.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<title>
CLOUD365
</title>
<meta>
</head>
<body>
@tronghuan98hd
tronghuan98hd / Backup.sh
Last active September 10, 2019 10:33
Bash script
#!/bin/bash
#make some variables
datetime=`date +"%d%m%Y-%H%M%S"`
file="money-data-$datetime"
url_file="/root/mysql/logs"
ip_server="172.16.2.160"
des_direct="/var/money/logs/"
#Backup database Money into file

Tải file mẫu về

wget https://gist.githubusercontent.com/congto/735a0dce8f4adc91d5886c12303b05f3/raw/6f5130fe7a83bcb8836476f544094b675b661570/filethuchanh.conf

Hoặc tự tạo file mẫu với nội dung dưới và lưu lại với tên file là filethuchanh.conf

# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
import MySQLdb
db_server = '127.0.0.1:8080'
db_user = 'root'
db_password = '1234'
db_name = 'testdb'
db_charset = 'utf8'
db = MySQLdb.db.connect(db_server, db_user, db_password, db_name, charset = db_charset)
print('Connected')