Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bgotink
bgotink / ._what.md
Last active July 26, 2022 14:13
A small C++ program that converts grayscale EXR to transparent EXR

gray2transparent

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

behaviour

  • takes only red channel of RGBA into account, prints message if color isn't gray
  • ignores pixels with transparancy already set tot a non-opaque value
  • makes lighter colors more transparant: alpha = 1 - red
@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

@bgotink
bgotink / ._what.md
Last active December 25, 2015 06:29 — forked from barijaona/._what.md

Badass git pull alternative

Add this in your path as git-up and git-reup (symbolic link) and it amps up your git pull by means of git up

  1. Adds in a list of the commits you're pulling down
  2. Auto-prunes remote branches
  3. Defaults to pull --rebase - gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.

Kyle Neath, Ryan Tomayko and then Zach Holman basically figured out how to do this. TheSpyder found a small error on case sensitive file systems.

@bgotink
bgotink / collatz.c
Created September 7, 2012 02:02
Collatz conjecture program in C, depends on libgmp
#include <stdio.h>
#include <string.h>
#include <gmp.h>
/*
* Dependency: libgmp
* Compile using:
* gcc -o collatz -l gmp collatz.c
*/
@bgotink
bgotink / brew.log
Created August 16, 2012 21:37
"brew install --HEAD e2fsprogs" log
bram:~/Downloads/backup$ brew install --HEAD e2fsprogs
==> Cloning https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
Cloning into '/Library/Caches/Homebrew/e2fsprogs--git'...
remote: Counting objects: 33824, done.
remote: Compressing objects: 100% (7500/7500), done.
remote: Total 33824 (delta 27272), reused 32257 (delta 26058)
Receiving objects: 100% (33824/33824), 16.32 MiB | 139 KiB/s, done.
Resolving deltas: 100% (27272/27272), done.
==> Downloading patches
######################################################################## 100.0%
@bgotink
bgotink / mount_tmpfs.sh
Created August 6, 2012 19:16 — forked from koshigoe/mount-ram.sh
Like tmpfs in Mac OS X. This code is public domain.
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#