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
@router.get("/request-received",tags=["request"]) | |
def get_request_received(user_id:str): | |
utils_db_order_ads.db.connect(reuse_if_open=True) | |
# step1: get marketer id | |
L = utils_db_order_ads.Marketer.select().where(utils_db_order_ads.Marketer.user_meey_id == user_id) | |
if len(L)==0: | |
return {'err':'not found marketer_id'} |
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
@router.get("/request",tags=["request"]) | |
def get_request(user_id:str): | |
utils_db_order_ads.db.connect(reuse_if_open=True) | |
# step 0 | |
L_request0 = utils_db_order_ads.Request.select().where(utils_db_order_ads.Request.customer_id == user_id).where(utils_db_order_ads.Request.status != 0) | |
# return len(L_request0) | |
# # step 1 | |
# L_order_ads = utils_db_order_ads.Order_ads.select().where(utils_db_order_ads.Order_ads.user_id == user_id) |
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
@router.get("/request",tags=["request"]) | |
def get_request(user_id:str): | |
utils_db_order_ads.db.connect(reuse_if_open=True) | |
# step 0 | |
L_request0 = utils_db_order_ads.Request.select().where(utils_db_order_ads.Request.customer_id == user_id).where(utils_db_order_ads.Request.status != 0) | |
# return len(L_request0) | |
# # step 1 | |
# L_order_ads = utils_db_order_ads.Order_ads.select().where(utils_db_order_ads.Order_ads.user_id == user_id) |
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
``` | |
CREATE USER 'username'@'%' IDENTIFIED BY 'new-password'; | |
FLUSH PRIVILEGES; | |
``` | |
OR | |
``` | |
CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'new-password'; |
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
import requests | |
import base64 | |
import slugify | |
# https://github.com/WP-API/Basic-Auth => use API wpv2 | |
url = 'http://newwp.nghiahsgs.com/wp-json/wp/v2/posts' | |
def base_64_encode(message): | |
# message = "admin:password" | |
message_bytes = message.encode('ascii') |
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
import requests | |
import base64 | |
import slugify | |
# https://github.com/WP-API/Basic-Auth => use API wpv2 | |
url = 'http://newwp.nghiahsgs.com/wp-json/wp/v2/posts' | |
username = '' | |
password = '' | |
def base_64_encode(message): |
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
class String_Interact(): | |
def __init__(self): | |
pass | |
def regex_one_value(self,pattern, input_str): | |
regex1=re.compile(pattern) | |
kq=regex1.search(input_str) | |
if kq: | |
kq=kq.group(1) |
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
javascript:var res = prompt("Điền đáp án của captcha tại đây.", "");document.querySelector("#g-recaptcha-response").value = res; |
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
systemctl restart sshd |
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
firewall-cmd --add-port=22/tcp --permanent | |
firewall-cmd --reload |
NewerOlder