Skip to content

Instantly share code, notes, and snippets.

@jchnkl
jchnkl / darktable-workflow.md
Created May 10, 2017 11:25 — forked from eimajtrebor/darktable-workflow.md
My Darktable Workflow

My Darktable Workflow

Basic workflow

  • Copy a film roll (a directory of RAW images) into a directory on the machine running Darktable.
  • Import the film roll into Darktable.
  • Review the images using lighttable mode and remove any images that are beyond repair.
  • Take a snapshot of the image so we can do a before and after comparison.
  • Adjust the white balance.
  • Exposure compensation and recovery.
" requires python-vim and GitPython
" (Arch: python2-vim && python2-gitpython
" https://chris-lamb.co.uk/posts/committing-every-time-you-save-vim
function! AutoCommit()
python << PYEOF
import vim, git
def python_input(message='', default=''):
@jchnkl
jchnkl / gist:7230205
Created October 30, 2013 10:18
Variadic templates, type deduction and type recursion
template<typename T>
class Printer {
public:
void print(void)
{
std::cerr << "ts: ";
for (auto & i : ts) {
std::cerr << i << ", ";
}
std::cerr << std::endl;
@jchnkl
jchnkl / xpp
Last active December 21, 2015 01:39
C++11 wrapper for XCB request-reply functions using variadic templates. Compilable example.
// g++ $(pkg-config --libs --cflags xcb) -std=c++11 -Wall xpp.cpp
#include <memory>
#include <xcb/xcb.h>
namespace xpp {
template<typename ... ARGS>
class Request {
public:
@jchnkl
jchnkl / caps_lock_as_esc_and_ctrl_key
Last active December 14, 2015 03:29
Caps Lock as Escape *and* Control key.
$ tree ~/.xkb
.xkb
├── keymap
│   └── default
└── symbols
└── capslock
$ xkbcomp -I${HOME}/.xkb ${HOME}/.xkb/keymap/default $DISPLAY
function show-manpage () {
autoload -U split-shell-arguments
split-shell-arguments
zle push-line
local BUFFER=" man ${reply[$REPLY]}"
zle accept-line
}
zle -N show-manpage
bindkey -a 'K' show-manpage
@jchnkl
jchnkl / gist:1609254
Created January 13, 2012 23:07
background a process automagically if its is an X11 program
setopt nohup # recommended for bg'ing a proc
setopt nocheckjobs # recommended for bg'ing a proc
#setopt auto_continue # recommened for disown'ing a proc
local alwaysBackgroundPattern
alwaysBackgroundPattern=('firefox.*' 'thunderbird.*' 'urxvt.*')
function checkForXProc() {
coproc isXWindow "$1" $(date +%s)
disown %isXWindow