This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Query a Magic: The Gathering card and show it via iTerm2's imgcat.""" | |
import mtgsdk | |
import shutil | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iterator> | |
#include <type_traits> | |
// Inspired by: | |
// http://stackoverflow.com/questions/10962290/find-position-of-element-in-c11-range-based-for-loop | |
template<typename T> | |
class Enumerator final { | |
public: | |
class iterator { | |
private: |