Skip to content

Instantly share code, notes, and snippets.

View listx's full-sized avatar

Linus Arver listx

View GitHub Profile
from click import command, option, Option, UsageError
class MutuallyExclusiveOption(Option):
mutex_groups = {}
def __init__(self, *args, **kwargs):
opts_list = kwargs.pop('mutex_group', "")
self.mutex_group_key = ','.join(opts_list)
self.mutex_groups[self.mutex_group_key] = 0
help = kwargs.get('help', '')
@listx
listx / curl.md
Created October 21, 2015 18:13 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin