Skip to content

Instantly share code, notes, and snippets.

View tomilov's full-sized avatar

Anatoliy V Tomilov tomilov

  • Yandex
  • Yekaterinburg
View GitHub Profile
@tomilov
tomilov / ratio.cpp
Last active October 25, 2016 08:13
#include <numeric>
#include <cassert>
class ratio
{
std::size_t n, d; // numerator, denominator
void
#include <type_traits>
#include <utility>
#include <tuple>
struct filler { template< typename type > operator type (); };
template< typename aggregate,
typename index_sequence = std::index_sequence<>,
typename = void >
struct aggregate_arity
#include <utility>
template< std::size_t I, typename F >
struct wrapper { F f; };
template< std::size_t I, typename F >
constexpr
F &
get(wrapper< I, F > * sg) noexcept
{
open-vm-tools open-vm-tools-desktop htop vim
doxygen doxygen-gui graphviz gnuplot
git subversion mercurial
openssh-server openssl openvpn sshfs libssl-dev
g++-5 gcc-5 gdb
cmake cmake-qt-gui
lzma lzma-dev liblzma-dev liblzma5 zlib1g zlib1g-dev libcurl4-openssl-dev libbz2-dev libbz2-1.0
m4 libtool autoconf automake make dh-autoreconf
swig3.0 libxml2 libxml2-dev libxml2-utils libncurses libncurses-dev libedit-dev
python2.7 python2.7-dev python3 lua5.3 perl python-dev
// http://wiki.musl-libc.org/wiki/BuildingLLVM
// build libunwind and all other libraries in -m32 and -m64 versions
// export CFLAGS="-march=native -mavx"
// export CXXFLAGS="-march=native -mavx"
// CMAKE_C_FLAGS and CMAKE_CXX_FLAGS += -fPIC for libs
// build last cmake version from https://cmake.org/files/
wget https://cmake.org/files/v3.6/cmake-3.6.1.zip
@tomilov
tomilov / springer-free-maths-books.sh
Created December 29, 2015 15:54 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-1779-2.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-2103-4.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4684-9884-4.pdf
wget http://link.springer.com/content/pdf/10.1007/978-3-662-02945-9.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4612-9923-3.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-3828-5.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4684-9936-0.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4419-8566-8.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-4385-2.pdf
wget http://link.springer.com/content/pdf/10.1007/978-1-4419-8592-7.pdf
#include <utility>
template< typename F, std::size_t ...indices >
struct enumerator
{
static constexpr const std::size_t size_ = sizeof...(indices);
static constexpr const std::size_t count_ = (indices * ...);
template< typename I >
struct decomposer;
#include <type_traits>
#include <iostream>
#include <cstdlib>
#define PP { std::cout << __PRETTY_FUNCTION__ << std::endl; }
struct descriptor
{
std::size_t const s;
struct S { ~S() noexcept(false) { ; } };
static_assert(noexcept(::new (nullptr) S()));
static_assert(!noexcept(S()));
struct T { T() noexcept(false) { ; } };
static_assert(!noexcept(::new (nullptr) T()));
static_assert(!noexcept(T()));
cd
svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/projects/
svn co https://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
svn co https://llvm.org/svn/llvm-project/libcxx/trunk libcxx
svn co https://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp
cd ../tools
svn co https://llvm.org/svn/llvm-project/cfe/trunk clang
svn co https://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra