Skip to content

Instantly share code, notes, and snippets.

JP Talusan linusmotu

Block or report user

Report or block linusmotu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@linusmotu
linusmotu / pingarper.sh
Created Aug 2, 2019
For pinging things connected to the ethernet at port eno1 of the device you are using.
View pingarper.sh
#!/bin/bash
declare -A devices
devices["name"]="MAC_address"
for i in "${!devices[@]}"
do
#echo "key: $i"
#echo "value: ${devices[$i]}"
@linusmotu
linusmotu / base.py
Created Jul 11, 2019
Demonstration of using pub-sub with ZMQstream base classes.
View base.py
import multiprocessing
from zmq.eventloop import ioloop, zmqstream
from zmq.utils import jsonapi as json
import zmq
decode = lambda x: x.decode('utf-8')
encode = lambda x: x.encode('ascii')
class ZmqProcess(multiprocessing.Process):
"""
@linusmotu
linusmotu / distributed.bib
Last active Nov 28, 2018
Distributed IoT references
View distributed.bib
@INPROCEEDINGS{nearcloud,
author={J. P. Talusan and Y. Nakamura and T. Mizumoto and K. Yasumoto},
booktitle={2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC)},
title={Near Cloud: Low-cost Low-Power Cloud Implementation for Rural Area Connectivity and Data Processing},
year={2018},
volume={02},
number={},
pages={622-627},
abstract={Information and communication technologies (ICTs) has enabled growth in developed countries and urban cities through improvements in communication systems, devices and applications. In rural areas, especially in developing countries, ICT penetration is not as high, often due to lack of available infrastructure and funding. With the increasing availability of Internet-of-Things (IoT) devices, low-cost large-scale deployments have become possible even in rural areas. We design, develop and implement, Near Cloud, a cloud-less platform that allows users and IoT devices to communicate and share information. This is built on top of a wireless mesh netw
@linusmotu
linusmotu / vid-create.py
Created Nov 26, 2018
Create video from png files
View vid-create.py
#!/usr/local/bin/python3
#Needs to install ffmpeg
#Run: python vid-create.py
#ffmpeg -i input.avi output.mp4
#pip install opencv-python
##########
import cv2
@linusmotu
linusmotu / AP_pi_settings
Last active Sep 27, 2018
Pi Connected to gateway via mesh network only, acts as AP
View AP_pi_settings
#Pi-7: Connected to internet only via Mesh network and serves as access point
#This serves as the bridge connecting the whole mesh to the internet
# This will work but you lose the ability to SSH to this?
# It's either that or it will lose the AP ability?
# After setting all the configs, just run ./setup-all.sh
#Takes time before activating/being in mesh and having internet
#Don't forget to setup the iptables and save it on reboot
#Don't forget to setup the AP as well. i think the main point here is in hostapd.conf
sudo apt-get install dnsmasq hostapd
@linusmotu
linusmotu / gateway_pi_settings
Last active Sep 27, 2018
Pi Connected to eth-0 acting as gateway
View gateway_pi_settings
#Pi-6: Connected to eth0 internet
#This serves as the bridge connecting the whole mesh to the internet
# This will work but you lose the ability to SSH to this?
# It's either that or it will lose the AP ability?
# After setting all the configs, just run ./setup-all.sh
# ****DONT TRUST ALL hahaha until Sept. 27, when i will retry it again
#OK So far all these works. I'm not sure if there are other config files that need to be changed.
# I just ran setup-all.sh on this and manscript.sh on pi-7 and after a while it works.
# sudo apt-get install dnsmasq hostapd
#I'll try again now when I attempt to change battery of pi-7 after restart.
You can’t perform that action at this time.