Python port listen

import socket import subprocess host = "172.18.0.1" port = 8888 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM | socket.SO_REUSEADDR) s.bind((host, port)) while 1: data, addr = s.recvfrom(1024) if data == ‘wakeonlan’: subprocess.call(["/usr/bin/wakeonlan", "-i", "192.168.178.20", "08:60:6e:6c:be:d8"])import socket import subprocess host = "172.18.0.1" port = 8888 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM | socket.SO_REUSEADDR) s.bind((host, port)) while 1: data, addr = s.recvfrom(1024)
Continue reading Python port listen

Install Docker on Linux Mint Sylvia

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" sudo apt-get update sudo apt-get install docker-ce sudo groupadd docker sudo usermod -aG docker $USERsudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – sudo add-apt-repository "deb [arch=amd64]
Continue reading Install Docker on Linux Mint Sylvia

Debug Capsule

$results = Capsule::select(‘select * from table’); var_dump($results);   Capsule::connection()->enableQueryLog(); $results = Capsule::select(‘SELECT * FROM test’); $query = Capsule::getQueryLog(); print_r($query); $results = Capsule::select(‘select * from table’); var_dump($results); Capsule::connection()->enableQueryLog(); $results = Capsule::select(‘SELECT * FROM test’); $query = Capsule::getQueryLog(); print_r($query);