본문 바로가기

분류 전체보기

(97)
Samba #Installation sudo apt-get install samba samba-common-bin #setting sudo nano /etc/samba/smb.conf #restart samba server, run this after config setting sudo systemctl restart smbd or sudo systemctl restart smbd.service #add user before create samba user sudo adduser ID sudo userdel ID #add samba user which user ID,the user name should be registered in linux in advance sudo smbpasswd -a ID sudo sys..
Ubuntu instaillation Installation 1. Write image to SD card, and mount it to Odroid 2. connect to power and wait 10~15 minutes until blue LED turns off, when LED is off, then reboot 3. check ip address ID : root password : odroid 4. change password sudo passwd root sudo apt update && sudo apt full-upgrade
PiVPN installation $ curl -L https://install.pivpn.io | bash #Create new account ID and Password, ROOT account is not recommended(or available) $ pivpn add #list all certificates $ pivpn list # Revoke a client ovpn profile $ pivpn revoke # Remove PiVPN $ pivpn uninstall #pivpn add 시 순서 DNS 사용 현재ip를 고정으로 사용 또는 DDNS사용 >> DDNS 사용 DDNS 업체는 맨 밑 Customs 선택 포트는 임의 지정 → 나중에 포트포워드 열어둬야함 WinSCP로 home/pi/ovpns/ID.ovpns파일을 다운..
Agenti - web admin http://ajenti.org/ http://docs.ajenti.org/en/latest/man/install.html curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s - Ajenti will be listening at HTTP port 8000 Log in with your root password or another OS user http://ipaddress:8000
Django installiation 장고 설치 sudo apt-get update sudo apt-get upgrade sudo apt install python-pip 또는 python3용 sudo apt install python3-pip #장고 2.0 버전 설치 sudo pip3 install django 또는 sudo pip3 install django~=2.0.0 sudo apt-get install python3-venv #가상환경 파일 python3 -m venv myvenv #가상환경 활성화 source myvenv/bin/activate #가상환경 중지(여기서는 스킵) deactivate django-admin startproject blog 기존의 Php의 경우에 파일 하나에 database 입력, 출력, html코드 작성 출력이 ..
Send image file to Telegram import requests url = "https://api.telegram.org//sendPhoto";files = {'photo': open('cctv.jpg', 'rb')}data = {'chat_id' : "CHAT_ID"}r= requests.post(url, files=files, data=data)print(r.status_code, r.reason, r.content) def sendImage(): url = "https://api.telegram.org/bot/sendPhoto"; files = {'photo': open('/path/to/img.jpg', 'rb')} data = {'chat_id' : "YOUR_CHAT_ID"} r= requests.post(url, files=f..
Clien login python 클리앙 로그인 파이썬 #참조 https://beomi.github.io/2017/01/20/HowToMakeWebCrawler-With-Login/ # -*- coding: UTF-8 -*- import requestsfrom bs4 import BeautifulSoup as bs LOGIN_INFO = { 'userId': 'IDisHERE', 'userPassword': 'PASSWORDisHERE'} with requests.Session() as s: first_page = s.get('https://www.clien.net/service') html = first_page.text soup = bs(html, 'html.parser') csrf = soup.find('input', {'name': '_csrf'}) ..
Xiaomi Mijia Hygrothermo V2 read data from Python3 샤오미 온습도계V2 파이썬으로 읽기 Reference : https://zsiti.eu/xiaomi-mijia-hygrothermo-v2-sensor-data-on-raspberry-pi/ #Bluetooth backend program install - $sudo apt-get install python3-pip libglib2.0-dev $sudo pip3 install bluepy $sudo git clone https://github.com/ratcashdev/mitemp.git $git clone https://github.com/ChristianKuehnel/btlewrap.git $sudo git clone https://github.com/ChristianKuehnel/btlewrap.git btlewrap-git $mv ...