Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

nghiahsgs nghiahsgs

🎯
Focusing
View GitHub Profile
@nghiahsgs
nghiahsgs / auto-create-new-image-wordpress-python
Created Aug 19, 2021
auto-create-new-image-wordpress-python
View auto-create-new-image-wordpress-python
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')
@nghiahsgs
nghiahsgs / auto-create-new-post-wordpress-python
Last active Aug 19, 2021
auto-create-new-post-wordpress-python
View auto-create-new-post-wordpress-python
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):
View class string
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)
View code_captcha_a_nghiem
javascript:var res = prompt("Điền đáp án của captcha tại đây.", "");document.querySelector("#g-recaptcha-response").value = res;
View gist:1bda6daac4743bde10c4517bc0139154
firewall-cmd --add-port=22/tcp --permanent
firewall-cmd --reload