Posts

Showing posts from 2019

Raspberry pi OTG cluster networking raspberry pi3 and raspberry pi zero

Let's assume you have two raspi zero and one raspi3, we want to connect pi zeros to reach internal networking with raspi3 as host and internet over raspi3. Add this to  /boot/cmdline.txt  after  rootwait pizero1 modules-load=dwc2,g_ether g_ether.host_addr=00:22:82:ff:ff: 01 g_ether.dev_addr=00:22:82:ff:ff: 11 quiet pizero2 modules-load=dwc2,g_ether g_ether.host_addr=00:22:82:ff:ff: 02 g_ether.dev_addr=00:22:82:ff:ff: 12 quiet Add this to  /boot/config.txt pizero1 and pizero2 dtoverlay=dwc2 gpu_mem=16 Add this to /etc/dhcpcd.conf  pizero1 interface usb0 static ip_address=192.168.7.2/24 static routers=192.168.7.1 static domain_name_servers=8.8.8.8 pizero2 interface usb0 static ip_address=192.168.7.2/24 static routers=192.168.7.1 static domain_name_servers=8.8.8.8 edit /etc/sysctl.conf make ip forward 1 and check if it's ok sudo sysctl -p /etc/sysctl.conf net.ipv4.ip_forward = 1 make sure ip forward is 1 an

[Solved] never ending lxml build raspberry pi 3, usb stick swap

Image
 if you have docker never ending lxml build for raspberry pi, you need to increase swap space. raspberry pi's default 100m is not enough for this. I had to make it with raspi overclock and usb stick 2gb swap space allocation, even with this setup 1gb memory and almost 350m swap usage it takes a lot of time to build lxml, be patient #result  Created wheel for websockets: filename=websockets-8.1-cp37-cp37m-linux_armv7l.whl size=78100 sha256=790eb0ccb81f08ae48e1d1930f2a2e8c2e2e846a01d7fe8bb1cb282cd8e5025f   Stored in directory: /root/.cache/pip/wheels/74/54/40/797b9f77057c12b05b85edbf63465cbe4c24f53d301de1432b   Building wheel for lxml (setup.py): started   Building wheel for lxml (setup.py): still running...   Building wheel for lxml (setup.py): still running...   Building wheel for lxml (setup.py): still running...   Building wheel for lxml (setup.py): still running...   Building wheel for lxml (setup.py): still running...   Building wheel for lxml (setup.py

How to train spamassassin to stop SPAM emails

train spam assasian with commands to learn from existing emails DOMAINPART will be your domain name LOCALPART will be your username  LOCALPART@ DOMAINPART root@ip-10-0-0-12:/var/log# sa-learn -p /home/USER/.spamassassin/user_prefs --ham /home/vmail/DOMAINPART/LOCALPART/.INBOX.Sent\ Messages/{cur,new} Learned tokens from 333 message(s) (333 message(s) examined) root@ip-10-0-0-12:/var/log# sa-learn -p /home/USER/.spamassassin/user_prefs --spam /home/vmail/DOMAINPART/LOCALPART/.Junk/{cur,new} Learned tokens from 1 message(s) (20 message(s) examined) root@ip-10-0-0-12:/var/log# sa-learn -p /home/USER/.spamassassin/user_prefs --spam /home/vmail/DOMAINPART/LOCALPART/.Trash/{cur,new} get and download new rules into spamassassin run following command from command line sa-update

iCloud missing original date of videos and photos

I downloaded some videos from iCloud since it is not showing original date of videos in finder so I try to find solution to reveal original dates of videos I found exiftool https://www.sno.phy.queensu.ca/~phil/exiftool/ which is working perfectly in mac I am planning to write a small script to add this information to the filenames or replace visible date in finder with this create and modify date coming soon... Media Create Date : 2017:06:04 17:03:37 Media Modify Date : 2017:06:04 17:04:33 macbook-air:jhead-3.03 sertac$ exiftool /Users/sertac/Downloads/IMG_7267.MOV ExifTool Version Number : 11.61 File Name : IMG_7267.MOV Directory : /Users/sertac/Downloads File Size : 103 MB File Modification Date/Time : 2019:08:12 15:24:04+03:00 File Access Date/Time : 2019:08:12 15:44:00+03:00 File Inode Change Date/Time : 2019:08:12 15:24:17+03:00 File Permiss

Using virtualenv with python3

pip3 install --upgrade virtualenv virtualenv nameofyourvirtenv