Skip to content

Instantly share code, notes, and snippets.

gray2white

This small C++ program converts a grayscale OpenEXR image to an image with transparancy and white colours.

behaviour

  • takes only red channel of RGBA into account, prints message if color isn't gray
  • makes any partially transparent pixel completely transparent
  • makes colours darker than #F0F0F0 white and colors lighter than or equal to #F0F0F0 transparent
@bgotink
bgotink / background-example.bash
Created April 22, 2015 14:19
background-example.bash
background() {
local pidfile="$1"
local logfile="$2"
shift; shift;
echo $BASHPID > "$pidfile"
exec "$@" >"$logfile" 2>&1
}
set SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
ssh-add
end
@bgotink
bgotink / keybase.md
Created March 29, 2015 20:42
keybase.md

Keybase proof

I hereby claim:

  • I am bgotink on github.
  • I am bgotink (https://keybase.io/bgotink) on keybase.
  • I have a public key whose fingerprint is D128 69B0 D750 5125 2312 D9BA B7E1 DF5C AA0E B1A5

To claim this, I am signing this object:

@bgotink
bgotink / exportRole.js
Created November 30, 2014 19:18
Helpers when copying existing roles between litus installations
function exportRole() {
var $actions = $('#actions'),
$name = $('#name'),
$parents = $('#parents');
// TODO change to new selectors for dev-form
var result = {};
// extract the name
if ($name.length > 0) {
@bgotink
bgotink / angstrom.md
Last active August 29, 2015 13:56
Angstrom compilation for beaglebone

Install dependencies

sudo <aptitute|apt-get> install git-core texinfo chrpath gawk

Install other dependencies when asked

Setup and compile

setup