Skip to content

Instantly share code, notes, and snippets.

@doppiomacchiatto
doppiomacchiatto / gist:cd7643cb9061af77d028147807af0c5d
Created September 18, 2018 13:52 — forked from ahojnnes/gist:3734557
OpenCV - skimage corner detection comparison
from skimage.feature import peak_local_max
from skimage.feature.corner import corner_harris, corner_subpix, corner_foerstner
from skimage import data
from skimage.io import imsave
from skimage.util import img_as_float, img_as_ubyte
from skimage.color import rgb2gray
import pylab as plt
import numpy as np
import cv2
@doppiomacchiatto
doppiomacchiatto / log.py
Created September 11, 2018 16:29 — forked from timss/log.py
Python logging across multiple modules with custom handler/filter and splitting loglevels between stdout/stderr
#!/usr/bin/env python3
import logging
import sys
import sublog
logger = logging.getLogger()
# http://stackoverflow.com/a/24956305/1076493
@doppiomacchiatto
doppiomacchiatto / ApacheTikaSolrIndexSearch
Created August 2, 2018 03:30 — forked from johnmiedema/ApacheTikaSolrIndexSearch
Use Apache Tika and Solr to index and search documents
//Use Apache Tika and Solr to crawl, index and search documents
//John Miedema http://johnmiedema.com
//-----------------------------------------------------------
//referenced libraries:
//Apache Tika 1.5
//Apache Solr 4.7.2
//Apache HttpClient 4.3.3 reqd to connect to Solr server
//Noggit json parser reqd for Solr commands
//-----------------------------------------------------------
//after Solr is downloaded, start it using the following commands
@doppiomacchiatto
doppiomacchiatto / docker-destroy-all.sh
Last active May 24, 2018 20:04 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}

An example cookbook directory

sdanna@gaius ~/tmp/example > tree
.
├── cookbooks
│   └── foobar
│       ├── CHANGELOG.md
│       ├── README.md
│       ├── attributes
│       ├── definitions
@doppiomacchiatto
doppiomacchiatto / knife.rb
Created January 25, 2018 19:18 — forked from jtimberman/knife.rb
Commented knife.rb for all the things
# Knife Configuration File.
#
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
#
# ~/Development/chef-repo/.chef/knife.rb
@doppiomacchiatto
doppiomacchiatto / add.sh
Created January 2, 2018 18:09 — forked from ArseniyShestakov/add.sh
My compiler alternatives
# Cleanup old alternatives
update-alternatives --remove-all cc
update-alternatives --remove-all c++
update-alternatives --remove-all gcc
update-alternatives --remove-all g++
update-alternatives --remove-all clang
update-alternatives --remove-all clang++
update-alternatives --remove-all icc
update-alternatives --remove-all icc++
@doppiomacchiatto
doppiomacchiatto / 1_kubernetes_on_macOS.md
Created December 21, 2017 01:15 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@doppiomacchiatto
doppiomacchiatto / README.md
Created October 30, 2017 00:40 — forked from dergachev/README.md
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM