This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# replace with address of folder that contains backups | |
DIR=/Users/nguyen.thanh.ha/Desktop/backupmongo | |
# remove all backups older than 30 days | |
find $DIR -mtime +30 -exec rm -rf {} \; | |
# create new backup for today | |
mongodump -h <host>:<port> --db <db name> -u <user name> -p <password> --out $DIR/`date +"%Y-%m-%d-%H%M%S"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Khi dùng thay APP_ID, OBJECT_ID, ACCESS_TOKEN và NUMBER_TO_CHECK --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import os.path | |
sys.path.append('/usr/local/lib/python3.6/site-packages') | |
import fbchat | |
from fbchat import log, Client # Nạp thư viện của fbchat | |
from fbchat.models import TypingStatus | |
import re |