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
/* | |
* Copyright 2013 Phil Brown | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
using System; | |
static class TimeKeeper | |
{ | |
public static readonly Func<DateTime> DefaultTimeKeeper = () => DateTime.UtcNow; | |
private static readonly object LockObject = new object(); | |
private static Func<DateTime> CurrentTimeKeeper = DefaultTimeKeeper; |
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 bash | |
# Generates gource video (h.264) out of multiple repositories. | |
# Pass the repositories as command line arguments. | |
# Example: | |
# gource-multiple-repositories /path/to/repo1 /path/to/repo2 | |
i=0 | |
for repo in "$*"; do | |
# 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29: | |
logfile="$(mktemp /tmp/gource.XXXXXX)" |
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 <iostream> | |
#include <thread> | |
#include <future> | |
#include <chrono> | |
#include <functional> | |
#include <deque> | |
struct task_queue { | |
task_queue() = default; | |
task_queue(const task_queue &) = delete; |
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
#ifndef ASIO_RANGE_UTIL_HPP_ | |
#define ASIO_RANGE_UTIL_HPP_ | |
#include <boost/range/iterator_range.hpp> | |
#include <boost/range/algorithm/search.hpp> | |
#include <boost/asio/buffer.hpp> | |
namespace httpc { | |
template <typename T> | |
inline boost::iterator_range<T *> make_iterator_range_from_memory(T *head, size_t size) { |