This file contains hidden or 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
#[macro_export] | |
macro_rules! list { | |
($val: expr => $($tail: expr)=>+) => { | |
{ | |
let mut node = ListNode::new($val); | |
node.next = Some(Box::new($crate::list!($($tail)=>+))); | |
node | |
} | |
}; | |
($val: expr) => { |
This file contains hidden or 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
#pragma once | |
#include <type_traits> | |
#include <utility> | |
namespace Fast | |
{ | |
template <typename Type, size_t Size, size_t Alignment> | |
class FastPimpl | |
{ | |
public: |
This file contains hidden or 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 <semaphore.h> | |
#include <atomic> | |
#include <cerrno> | |
#include <chrono> | |
#include <cstdio> | |
#include <ctime> | |
#include <memory> | |
#include <mutex> | |
#include <system_error> |
This file contains hidden or 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
# deb http://snapshot.debian.org/archive/debian/20190506T000000Z stretch main | |
deb http://deb.debian.org/debian stretch main | |
# deb http://snapshot.debian.org/archive/debian-security/20190506T000000Z stretch/updates main | |
deb http://security.debian.org/debian-security stretch/updates main | |
# deb http://snapshot.debian.org/archive/debian/20190506T000000Z stretch-updates main | |
deb [arch=amd64] https://download.docker.com/linux/debian stretch stable | |
# deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable | |
deb http://deb.debian.org/debian stretch-updates main |
This file contains hidden or 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 | |
apt-get update && \ | |
apt-get -y install apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg2 \ | |
software-properties-common && \ | |
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \ | |
add-apt-repository \ |
This file contains hidden or 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
# We need to properly escape DCGM_GLOBAL_CFLAGS and DCGM_GLOBAL_LDFLAGS | |
# in a way that neither submake nor shell breake them due to substitutions rules. | |
# | |
# Here is the example of what is going on: | |
# This makefile: | |
# DCGM_GLOBAL_LDFLAGS := '-Wl,-rpath,$$ORIGIN/' | |
# DCGM_GLOBAL_LDFALGS += '-Wl,-static' | |
# | |
# To allow another make process to see this variable in exacly the same way, it should be quoted: | |
# make DCGM_GLOBAL_LDFLAGS=$'\'-Wl,-rpath,\$\$ORIGIN/\' \'-Wl,-static\'' |
This file contains hidden or 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 <mutex> | |
#include <utility> | |
#include <future> | |
#include <thread> | |
#include <vector> | |
#include <cstdio> | |
struct NoLog{ | |
template <class ... TArgs> |
This file contains hidden or 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
https://support.office.com/en-us/article/language-accessory-pack-for-office-82ee1236-0f9a-45ee-9c72-05b026ee809f | |
https://products.office.com/en-us/compare-all-microsoft-office-products?tab=1 |
This file contains hidden or 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 <functional> | |
#include <memory> | |
#define THIS_DECORATOR \ | |
private: \ | |
_Tx* This(){ \ | |
return static_cast<_Tx*>(this);\ | |
}\ |