Skip to content

Instantly share code, notes, and snippets.

@jon1012
jon1012 / sds011.py
Last active October 23, 2017 09:23 — forked from geoffwatts/sds011.py
Read an SDS011 Laser PM2.5 Sensor (Nova PM Sensor) with Python
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import serial, time, struct
import httplib, urllib
ser = serial.Serial("/dev/ttyUSB0", baudrate=9600, stopbits=1, parity="N", timeout=2)
ser.flushInput()
@jon1012
jon1012 / Category.sql
Last active August 29, 2015 14:13 — forked from ticean/Category.sql
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION