Skip to content

Instantly share code, notes, and snippets.

@sheffler
sheffler / linuxftpwebcam01.sh
Created July 29, 2011 18:35
Webcam upload to Sensr using periodic FTP
#!/bin/bash
# Example FTP upload to Sensr from /dev/video0
# (uses ffmpeg to grab frames from webcam)
# Sensr FTP information
HOST=f7.sensr.net
USER=cam28
PASS=l4hqpy0ywm
echo Starting FtpCam ${HOST} ${USER} ${PASS}
@sheffler
sheffler / sensr_ffmpeg_mjpeg.sh
Created August 1, 2011 18:13
Streaming Webcam upload to Sensr via ffmpeg and MJPEG
#!/bin/bash
# Sensr FTP information
HOST=f7.sensr.net
USER=cam28
PASS=l4hqpy0ywm
echo Starting SensrCam ${HOST} ${USER} ${PASS}
# Exit by hitting ^C
@sheffler
sheffler / ex1.py
Created September 22, 2011 19:53
Twisted11 Basic Auth using Password Dictionary
#!/usr/bin/env python
from zope.interface import implements
from twisted.cred import portal, checkers, credentials, error as credError
from twisted.internet import defer, reactor
from twisted.web import static, resource
from twisted.web.resource import IResource
from twisted.web.http import HTTPChannel
from twisted.web import server
from twisted.web.guard import HTTPAuthSessionWrapper
@sheffler
sheffler / err1.py
Created September 22, 2011 19:53
Twisted11 Erroneous Digest Auth using Password Dictionary
#!/usr/bin/env python
from zope.interface import implements
from twisted.cred import portal, checkers, credentials, error as credError
from twisted.internet import defer, reactor
from twisted.web import static, resource
from twisted.web.resource import IResource
from twisted.web.http import HTTPChannel
from twisted.web import server
from twisted.web.guard import HTTPAuthSessionWrapper
@sheffler
sheffler / ex2.py
Created September 22, 2011 19:54
Twisted11 Digest Auth using Password Dictionary
#!/usr/bin/env python
from zope.interface import implements
from twisted.cred import portal, checkers, credentials, error as credError
from twisted.internet import defer, reactor
from twisted.web import static, resource
from twisted.web.resource import IResource
from twisted.web.http import HTTPChannel
from twisted.web import server
from twisted.web.guard import HTTPAuthSessionWrapper