Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Henderson stevehenderson

View GitHub Profile
View faculty.py
import scrapy
import re
import json
class FacultySpider(scrapy.Spider):
name = "faculty"
def start_requests(self):
urls = [
'https://compsci.uncg.edu/faculty/minjeong-kim/',
View raspberry_pi_camera_vnc.sh
raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264
View nodered_green_red_light.json
[
{
"id": "a35b9d70.ae8be",
"type": "tab",
"label": "GREEN-RED DEMO",
"disabled": false,
"info": ""
},
{
"id": "ef262268.43b27",
View nodered_green_lab.json
[
{
"id": "e8651431.f956e8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a645b11c.917fd",
@stevehenderson
stevehenderson / HOWTO.txt
Created Oct 5, 2019 — forked from mcm/HOWTO.txt
Use daemonlogger + VXLAN to create "software span"
View HOWTO.txt
**Only really tested on Ubuntu 16.04**
Requirements:
* Two Linux systems (one to send traffic, one to receive)
* Network connectivity over UDP 4789
Sender Setup
* Install daemonlogger (sudo apt install daemonlogger)
* Save systemd service config as /etc/systemd/system/daemonlogger@.service (replace X.X.X.X with IP of receiver)
* Reload systemd (sudo systemctl daemon-reload)
@stevehenderson
stevehenderson / posix-fun-time.R
Created Oct 16, 2017
POSIX Time Function example R
View posix-fun-time.R
#Dude timeformat string important
as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S")
as.numeric(as.POSIXct(acas[1,]$DATETIME_END, format="%Y-%m-%dT%H:%M:%S"))
@stevehenderson
stevehenderson / map-roll.js
Last active Sep 27, 2017
A module for loading a map in regions
View map-roll.js
var WorldMap = (function () {
var map;
focusRegion = 0;
function rotateFocus() {
focusRegion++;
if(focusRegion>=areas.length) focusRegion=1;
View firstLast6.java
public boolean firstLast6(int[] nums) {
if((nums[0]==6)||(nums[nums.length-1]==6) )
return true;
else
return false;
}
View regex neo4j
How to parse this with regex:
{"unit":"101","location_z":1.012054,"location_x":0.956146,"name":"Placer(Clodde)","location_y":-0.3787908,"html":"(unset)","label":"0","type":"1","affordance_id":"453450c6-6219-4dbd-bcb7-061f3472b619"}
test here: http://regexstorm.net/tester
GETS PAIRS
(\".+?\":.+?[,}])
GET SINGLES
You can’t perform that action at this time.