Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicholas Lochner njlochner

View GitHub Profile
@njlochner
njlochner / simple_mjpeg_streamer_http_server
Created Mar 30, 2016 — forked from n3wtron/simple_mjpeg_streamer_http_server
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
View simple_mjpeg_streamer_http_server
#!/usr/bin/python
'''
Author: Igor Maculan - n3wtron@gmail.com
A Simple mjpg stream http server
License: GPL v3
'''
import cv2
import Image
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
import StringIO
View Main Program
import httplib
import time
import datetime
import re
import random
import live
import buyLow
import buySMA
import buyLMA
View gist:8d25e24c39bdf2ebf970
For example, you have:
Foo[bar, "blah", bar]
Foo[bar, "foo", bar]
and want to change them both to:
Foo[baz, "blah", baz]
Foo[baz, "foo", baz]
find: Foo\[bar, (.*), bar\]
replace Foo\[baz, $1, baz\]
@njlochner
njlochner / DMP_backup.sh
Created May 9, 2015
Simple script to generate backups for Kerbal Space Program Dark Multiplayer Mod
View DMP_backup.sh
#!/bin/bash
i=0
while true
do
echo "Generating Backup $i"
tar -pczf /var/www/DMP_backups/DMP_bak_6-$i.tar.gz DMP
sleep 10m
#sleep 20m