Get list of date from today until 250 days before.
import requests
import time
import datetime
numdays = 250
## | |
## How to install mcrypt in php7.2 / php7.3 | |
## Linux / MacOS / OSX | |
## | |
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
# |
# download font file มาก่อน | |
!wget https://awards.opdc.go.th/awards_opdc/assets/fonts/THSarabunNew/THSarabunNew.ttf | |
# import and install | |
import matplotlib.pyplot as plt | |
import matplotlib.font_manager as fm | |
font_list = fm.createFontList(['THSarabunNew.ttf']) | |
fm.fontManager.ttflist.extend(font_list) | |
# set font | |
plt.rcParams['font.family'] = 'TH Sarabun New' | |
plt.rcParams['xtick.labelsize'] = 20.0 |
#/etc/systemd/system/test.service | |
[Unit] | |
Description=Test Systemd Service | |
[Service] | |
ExecStartPre=/usr/bin/echo -e "\033[0;33m Pre start \033[0m" | |
ExecStart=/usr/bin/sleep 10 | |
ExecStartPost=/usr/bin/echo -e "\033[0;33m Post start \033[0m" |
from Crypto.Cipher import AES | |
from Crypto.Util import Padding | |
from hashlib import md5 | |
from base64 import b64encode, b64decode | |
import sys | |
passphrase = sys.argv[1] | |
content = sys.argv[2] | |
print(passphrase, content) |
{ | |
"scripts": { | |
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | |
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | |
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm", | |
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | |
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js", | |
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz", | |
} | |
} |
// Thank you Ranatchai Chernbamrung for sample socketIO singleton pattern | |
// This code is originally for my React project, but should work with any ES6 project that support `import` statement | |
// How it works | |
// 1. Create webSocket.js to establish the connection and retrieve the connection | |
// 2. In main file, import webSocket.js to establish the connection | |
// 3. In other component files, import webSocket.js to retrieve the connection | |
// webSocket.js | |
let client |
#!/usr/bin/python | |
# This file has no update anymore. Please see https://github.com/worawit/MS17-010 | |
from impacket import smb, ntlm | |
from struct import pack | |
import sys | |
import socket | |
''' | |
EternalBlue exploit for Windows 8 and 2012 by sleepya | |
The exploit might FAIL and CRASH a target system (depended on what is overwritten) |
#!/usr/bin/python | |
# This file has no update anymore. Please see https://github.com/worawit/MS17-010 | |
from impacket import smb | |
from struct import pack | |
import sys | |
import socket | |
''' | |
EternalBlue exploit for Windows 7/2008 by sleepya | |
The exploit might FAIL and CRASH a target system (depended on what is overwritten) |