Skip to content

Instantly share code, notes, and snippets.

@sanelson
sanelson / raw_dump.cpp
Created April 5, 2020 00:17
RAW image file dump example for LibRaw
/* -*- C++ -*-
* File: raw_dump.cpp
* Copyright 2008-2019 LibRaw LLC (info@libraw.org)
* Created: Sat Mar 14, 2020
*
* LibRaw sample
* Demosaic RAW image and write color channel data to stdout
*
* The default is to output all color channels, but a combination of channels can also be selected
* Inspiration taken from the rawtran RAW to FITS conversion wrapper for dcraw
@sanelson
sanelson / python_mp_progress.py
Created May 1, 2016 16:58
Python Multiprocessing with simple progress tracking via queues in main process
from progressbar import ProgressBar, SimpleProgress
from multiprocessing import Process, Queue
from time import sleep
import progressbar
class Worker():
def __init__(self, name, result_queue, process):
self.name = name
-- List all hosts, including custom attributes
--
-- LONG_DESC:
-- This query will return a list of FQDN names for all hosts in the database.
-- It includes the device type, IP, MAC, Subnet name, location, plus custom attributes
--
-- USAGE:
-- No options available for this query, just run it
--
-- Your SQL statement would go below this line:
@sanelson
sanelson / coin.rb
Created December 8, 2013 07:02
Updated homebrew formula for coin3d to fix xcode build issue on OSX 10.9
require 'formula'
class Coin < Formula
homepage 'https://bitbucket.org/Coin3D/coin/wiki/Home'
url 'https://bitbucket.org/Coin3D/coin/downloads/Coin-3.1.3.tar.gz'
sha1 '8e9f05628461963623686d3ec53102214e233dd1'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",