Skip to content

Instantly share code, notes, and snippets.

View blebo's full-sized avatar

Adam Gibson blebo

View GitHub Profile
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"

This is a work in progress, proceed with caution

Install Proxmox and a Ubuntu VM with Portainer to manage docker containers

Setup Proxmox

  1. Install Proxmox 6.X iso I selected 2 drives in Raid 1 mirror
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
Mac Network Commands Cheat Sheet
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty.
Get an ip address for en0:
ipconfig getifaddr en0
Same thing, but setting and echoing a variable:
@blebo
blebo / Dockerfile
Last active August 29, 2015 14:01 — forked from jonbinney/Dockerfile
Updated for Ubuntu 13.04 (raring), due to dep errors when installing ros.
FROM ubuntu:raring
# ubuntu raring image doesn't have universe repo
run echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
run apt-get update
RUN apt-get install -y wget
# install ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu raring main" > /etc/apt/sources.list.d/ros-latest.list'
RUN wget http://packages.ros.org/ros.key -O - | apt-key add -
'''
Stream the Kivy window into a MJPEG HTTP server
===============================================
:Configuration:
`ip` : str, default to ''
By default, server will listen on all ips availables
`port` : int, default to 8000
TCP Port to listen
`fps` : int, default to 20
#!/usr/bin/python
#based on the ideas from http://synack.me/blog/implementing-http-live-streaming
# Run this script and then launch the following pipeline:
# gst-launch videotestsrc pattern=ball ! video/x-raw-rgb, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! tcpclientsink port=9999
from Queue import Queue
from threading import Thread
from socket import socket
from select import select
from wsgiref.simple_server import WSGIServer, make_server, WSGIRequestHandler
@blebo
blebo / pyvenvex.py
Created January 31, 2013 11:55 — forked from vsajip/pyvenvex.py
#
# Copyright (C) 2013 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve