Skip to content

Instantly share code, notes, and snippets.

Avatar
👤
compiling...

md exp0nge

👤
compiling...
View GitHub Profile
@exp0nge
exp0nge / rw_sensor_data.py
Last active Jun 7, 2018
Sensing the World in All Three Dimensions: read/write Infineon sensor data using Serial
View rw_sensor_data.py
import serial
ser = serial.Serial('/dev/ttyACM0')
with open('log.txt', 'w') as log_file:
while True:
msg = ''
c = ser.read(1).decode('utf-8')
while c != '\n':
View pi_led.py
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
print "LED on"
GPIO.output(18,GPIO.HIGH)
time.sleep(1)
print "LED off"
GPIO.output(18,GPIO.LOW)
View markdown.yaml
apiVersion: v1
kind: Service
metadata:
name: markdownrender
labels:
app: markdownrender
spec:
type: NodePort
ports:
- port: 8080
View tj-bootstrap-no-watson.sh
#!/bin/sh
#----make sure this is run as root
user=`id -u`
if [ $user -ne 0 ]; then
echo "This script requires root permissions. Please run this script with sudo."
exit
fi
#----ascii art!
View rover.py
"""
Execute in Intel Edison
"""
import time
def does_module_exists(module_name):
try:
__import__(module_name)
except ImportError:
return False
@exp0nge
exp0nge / utterances.txt
Last active Mar 4, 2019
Doorman Custom Skill Utterances
View utterances.txt
CheckDoorIntent check my {door|CheckDoorQuery}
CheckDoorIntent to check my {door|CheckDoorQuery}
CheckDoorIntent see if someone is at my {door|CheckDoorQuery}
CheckDoorIntent is anyone there {anyone|CheckDoorQuery}
CheckDoorIntent do I have a {package|CheckDoorQuery}
CheckDoorIntent what is at the {door|CheckDoorQuery}
StatusIntent to check my camera {status|StatusQuery}
StatusIntent {status|StatusQuery}
StatusIntent is my camera {working|StatusQuery}
StatusIntent is my camera {functional|StatusQuery}
@exp0nge
exp0nge / intent-schema.json
Created Jan 17, 2018
Doorman Custom Skill Intent Schema
View intent-schema.json
{
"intents": [
{
"slots": [
{
"name": "CheckDoorQuery",
"type": "LITERAL"
}
],
"intent": "CheckDoorIntent"
View wifi-setup.sh
#!/bin/bash
(
dmesg -D
echo Scanning for wifi networks:
ifup wlan0
wpa_cli scan
echo -e "\nStrongest networks found:"
wpa_cli scan_res | sort -grk 3 | head | awk -F '\t' '{print $NF}' | uniq
set -e
echo -e /"\nWARNING: this script will back up and remove all of your current wifi configs."
@exp0nge
exp0nge / nginx.conf
Created Nov 7, 2017 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@exp0nge
exp0nge / python3_mraa_upm
Last active Apr 18, 2017 — forked from gaiar/python3_mraa_upm
How to install Python 3 with libmraa and upm
View python3_mraa_upm
GETTING FROM REPO [Broken]
# Adding repositories and installing required software
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf && echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf && echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf && opkg update
# Updating mraa and upm
opkg upgrade libmraa0 && opkg upgrade upm
You can’t perform that action at this time.