This specification defines Command Line Arguments level 1 (CLARG 1.0). This document aims to direct development of command line tools conform to a set of rules while parsing options.
The different type of arguments are:
- Short Option
- Long Option
import pprint | |
import os | |
import sys | |
import threading | |
import time | |
import traceback | |
_crier = None | |
def init_crier(temp_dir='/tmp'): | |
"Initialzies Crier, ensuring it's only created once in the process" |
import ldap | |
def check_credentials(username, password): | |
"""Verifies credentials for username and password. | |
Returns None on success or a string describing the error on failure | |
# Adapt to your needs | |
""" | |
LDAP_SERVER = 'ldap://xxx' | |
# fully qualified AD user name | |
LDAP_USERNAME = '%[email protected]' % username |
#!/bin/bash | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
#include <iostream> | |
#include <iomanip> | |
// | |
// Utilities | |
// | |
// RETURNS() is used to avoid writing boilerplate "->decltype(x) { return x; }" phrases. | |
// | |
// USAGE: auto function(<arguments>) RETURNS(<some-expression>); | |
// |
-- DESCRIPTION -- | |
If you accidentally commit a huge file, you have a problem. Sure, you can remove it from the working tree and commit, | |
but the file is still reachable from your history and therefore causes every clone to be as huge as the commented | |
binary file. | |
Fixing this can be very ugly, time consuming and might not even work as you wish. Luckily, this script can protect | |
you from committing such monsters in the first place. | |
It looks through the staged files (the ones that are added with the "git add"-command) and checks for their file-size. | |
If they are larger then the given size, the commit is aborted and you get a message telling you what file takes so |
from setuptools import Command | |
class Compile(Command): | |
description = "run a custom compile command" | |
user_options = tuple() | |
def run(self): | |
print self.description | |
def initialize_options(self): |
The contents of this file pretty much copy the data that can be obtained from http://goodreads.com/manpages Though I’ll certainly post some reviews here that I won’t post to the goodreads, so feel free to follow this gist if you are interested in the aggregated information on what I read. I have started that log at April 20th and plan to continue writing it for as long as I read books. No spoilers.
namespace MyNamespace | |
type IMyInterface = | |
abstract GetValue: unit -> string | |
type MyRecord = | |
{ MyField1: int | |
MyField2: string } | |
interface IMyInterface with | |
member x.GetValue() = x.MyField2 |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <list> | |
#include <string> | |
using namespace std; | |
template<class T> |