분류 전체보기 (97) 썸네일형 리스트형 SSL 무료로 설치 렛츠인크립트 Let's Encrypt sudo apt install python-certbot-apache #도메인 등록 이전에 호스트 ip 가 서버 ip로 변경이 되어있어야함 sudo certbot --apache -d domain.com #메일주소 입력 #사용약관 동의 y #이메일주소메일링리스트 등록 n # http 접속시 https로 리다이렉트 - 1 안한다(선택), 2 한다 # virtual host 80번포트에서 https로 redirect 후 ssl 적용 # 도메인파일 생성여부 확인 ls /etc/letsencrypt/live/ sudo a2enmod ssl sudo a2enmod cgid #default-ssl.conf 파일 설정 443 포트로 접속시 폴더이동 Python CGI를 활성화키 위해 아래 문구 삽입 nano /etc.. Windows cd-key finder by VBS 1. copy and paste following codes into text editor, 2. save it with extionsion '.vbs' 3. run the vbs file, 4. you will see windows cd-key in popup Set WshShell = CreateObject("WScript.Shell") winkey = ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) CreateObject("WScript.Shell").Run _ "mshta.exe javascript:eval(""document.parentWindow.clipboard.. MiTemp2 Read and write to SQL This post is for reading MiTemperature2 data via bluetooth and writing the data into SQL. Download reading temp. source from Github https://github.com/JsBergbau/MiTemperature2 Modify LYWSD03MMC.py file as below. parser=argparse.ArgumentParser(allow_abbrev=False) parser.add_argument("--device","-d", help="Set the device MAC-Address in format AA:BB:CC:DD:EE:FF",default='AA:BB:CC:DD:EE:FF',metavar=.. Python CGI #enable CGI sudo a2enmod cgi.load sudo systemctl restart apache2 sudo service apache2 restart sudo nano /etc/apache2/apache2.conf ServerName domain.com DocumentRoot /var/www/domain/ ScriptAlias /api/ /var/www/api/ Options +ExecCGI AddHandler cgi-script .py sudo sevice apache2 restart sudo nano /var/www/domain/index.py #!/usr/bin/python3 import cgi import cgitb cgitb.enable(display=0, logdir="/pa.. Core Temp This app can show CPU temperature on tray bar as below Download link https://www.alcpu.com/CoreTemp/ HIDE taskbar button when start-up in settings RaspberryPi Imager www.raspberrypi.org/software/ Open Hidden option CTRL + SHIFT + X ngrok #download manually http://ngrok.com/download sudo wget get https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip unzip ngrok-stable-linux-arm.zip ./ngrok authtoken #get AUTH KEY https://dashboard.ngrok.com/get-started/your-authtoken For Web ./ngrok http 8080 For SSH ./ngrok tcp 22 Skip sudo apt install snapd sudo systemctl status ssh sudo snap install ngrok ngrok authtoken www.endtoend.. SQLite3 import sqlite3 dbpath = "test.db" conn = sqlite3.connect(dbpath) #File creation part try: cur = conn.cursor() cur.execute("CREATE TABLE info (name1 TEXT, name2 INTEGER)") conn.commit() except: print('File is Existing') #Input part cur = conn.cursor() cur.execute("INSERT INTO info (name1, name2) VALUES ('Hello', 57)") conn.commit() cur = conn.cursor() cur.execute("SELECT * FROM info") result = cu.. 이전 1 2 3 4 5 6 ··· 13 다음