Skip to content

Instantly share code, notes, and snippets.

View alibitek's full-sized avatar
🌱
Growing

Alex Bitek alibitek

🌱
Growing
View GitHub Profile
/*
* 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
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;
#!/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)"
#include <iostream>
#include <thread>
#include <future>
#include <chrono>
#include <functional>
#include <deque>
struct task_queue {
task_queue() = default;
task_queue(const task_queue &) = delete;
@alibitek
alibitek / asio_range_util.hpp
Created December 5, 2012 15:40 — forked from kikairoya/asio_range_util.hpp
asio http client without istream
#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) {