Skip to content

Instantly share code, notes, and snippets.

View pmtpro's full-sized avatar

pmtpro pmtpro

View GitHub Profile
@pmtpro
pmtpro / wordpress_export_to_json.php
Created February 14, 2023 00:44 — forked from jsnelders/wordpress_export_to_json.php
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/
@pmtpro
pmtpro / example.js
Created February 6, 2021 14:07 — forked from magemore/example.js
upload image from clipboard on ctrl+v event on page
function uploadFile(file) {
var formData = new FormData();
formData.append("userfile", file);
var request = new XMLHttpRequest();
request.onload = function () {
if (request.status == 200) {
document.location.href='/';
} else {
alert('Error! Upload failed');
}
# nhap thu vien
import requests, tabulate, json
# lay thong tin
year = input('Year: ')
id = input('ID: ')
# lay ket qua
request = 'https://diemthi.vnanet.vn/Home/SearchBySobaodanh?code=%s&nam=%s' %(id, year)
data = json.loads(requests.get(request).text)
@pmtpro
pmtpro / screenshot
Created August 30, 2020 07:29
xfce4-screenshot auto save
#!/bin/bash
SS_NAME=$HOME/Pictures/ScreenShot_$(date +%F_%S%N).png
xfce4-screenshooter -c -f -s $SS_NAME

Keybase proof

I hereby claim:

  • I am pmtpro on github.
  • I am pmtpro (https://keybase.io/pmtpro) on keybase.
  • I have a public key ASA61hOszQW-xE_zh7hG0vOq3lYsBi7miPr-KAcnuE836wo

To claim this, I am signing this object: