Skip to content

Instantly share code, notes, and snippets.

View sandlbn's full-sized avatar

Marcin Spoczynski sandlbn

  • Intel Labs
  • Portland, Oregon
View GitHub Profile

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

heat_template_version: 2013-05-23
description: >
Creates a vm with access to the internet.
parameters:
#Server Parameters
image:
type: string
heat_template_version: 2013-05-23
description: >
Creates a vm with access to the internet.
parameters:
#Server Parameters
image:
type: string
@sandlbn
sandlbn / test
Created February 16, 2015 11:52
heat_template_version: 2013-05-23
description: >
Creates a vm with access to the internet.
parameters:
#Server Parameters
image:
type: string
@sandlbn
sandlbn / localrc
Last active August 29, 2015 14:15
localrc
HOST_IP=10.0.0.57
PUBLIC_INTERFACE=eth0
FLAT_INTERFACE=eth0
FIXED_RANGE=10.4.128.0/20
FIXED_NETWORK_SIZE=4096
FLOATING_RANGE=10.0.0.128/25
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
$git clone https://github.com/sandlbn/occi-os
$cd occi-os
$git checkout stable/juno-neutron
$sudo python setup install
$sudo pip install pyssf
// add below lines to the nova api conf file /etc/nova/api-paste.ini
[composite:occiapi]
use = egg:Paste#urlmap
/: occiapppipe
@sandlbn
sandlbn / docker-registry.conf
Created April 3, 2015 14:01
docker-registry.conf
description "Docker Registry"
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 10 5
script
exec gunicorn --access-logfile /var/log/docker-registry/access.log --error-logfile /var/log/docker-registry/server.log -k gevent --max-requests 100 --graceful-timeout 3600 -t 3600 -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application
@sandlbn
sandlbn / csyslog.py
Last active August 29, 2015 14:22
fsyslog
import time
import socket
import fcntl
import struct
from sys import argv, exit
def get_ip_address(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
@sandlbn
sandlbn / livirt
Last active October 10, 2021 23:46
How to compile libvirt on ubuntu
sudo apt-get install git build-essential xsltproc libxml-xpath-perl libyajl-dev libdevmapper-dev libpciaccess-dev libnl-dev systemtap-sdt-dev uuid-dev libtool autoconf pkg-config libxml2 libxml2-utils autopoint python-dev libnuma-dev gettext
git clone https://github.com/K1773R/numad.git
cd numad
make
sudo make install
cd ..; cd libvirt
git clone git://libvirt.org/libvirt.git
./autogen.sh
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-qemu=yes --with-dtrace --with-numad --with-storage-rbd --disable-nls
{
"version": 1,
"schedule": {
"type": "simple",
"interval": "1s"
},
"workflow": {
"collect": {
"metrics": {
"/intel/psutil/load/load1": {},