Normal markdown code blocks with syntax highlighting:
template <class T> class foo;The harder way which permits inline hyperlinking:
template <class T> class foo;
Note the link and syntax highlighting!
| #include <stdio.h> | |
| #define BOOST_AFIO_DECLARE_CLASS_ENUM_AS_BITFIELD(type) \ | |
| inline constexpr type operator&(type a, type b) \ | |
| { \ | |
| return static_cast<type>(static_cast<size_t>(a) & static_cast<size_t>(b)); \ | |
| } \ | |
| inline constexpr type operator&=(type a, type b) \ | |
| { \ | |
| return static_cast<type>(static_cast<size_t>(a) & static_cast<size_t>(b)); \ |
| #include <stdio.h> | |
| #define BOOST_CXX14_CONSTEXPR constexpr | |
| //! Constexpr bitwise flags support | |
| template<class Derived, class T = unsigned> class bitwise_flags | |
| { | |
| T _value; | |
| public: | |
| //! The underlying type |
| #include <stdio.h> | |
| #include <type_traits> | |
| #define BOOST_CXX14_CONSTEXPR constexpr | |
| template<class Enum> struct bitfield : public Enum | |
| { | |
| using enum_type = typename Enum::enum_type; | |
| using underlying_type = std::underlying_type_t<enum_type>; | |
| private: |
| cd /root | |
| aptitude install curl git | |
| git clone https://github.com/ned14/mailinabox.git | |
| cd mailinabox | |
| DISABLE_FIREWALL=1 setup/start.sh | |
| (Use usual@nedprod.com for the email and mail.nedprod.com for the server) | |
| cd /home/user-data/ssl/nedprod.com | |
| nano private_key.pem | |
| (Use nedprod.com cert private key) | |
| chmod og-rwx private_key.pem |
| #!/usr/bin/python3 | |
| # Converts Pegasus Mail v4.x .PMM files into Unix mbox files using lots | |
| # of heuristics to repair any corruption in the Pegasus mail store | |
| # (the "Unix mbox" feature of Pegasus produces malformed Unix mbox files) | |
| # (C) 2016 Niall Douglas http://www.nedprod.com/ | |
| # File created: Dec 2016 | |
| # | |
| # Best used with python 3.6, anything older has a less able email and | |
| # mailbox python modules |
| cd boost-lite | |
| git checkout master | |
| git checkout include/revision.hpp | |
| git pull | |
| git submodule update --init | |
| mkdir -p build_posix | |
| cd build_posix | |
| cmake .. | |
| cd ../.. |
| /* Demos the poor cached i/o performance on Windows | |
| Windows x64 with NTFS: | |
| memcpy: 91.7057ns per 1Kb | |
| Write: 1258.34ns per 1Kb | |
| Read: 1318ns per 1Kb | |
| Linux x64 with ext4: |
Normal markdown code blocks with syntax highlighting:
template <class T> class foo;The harder way which permits inline hyperlinking:
template <class T> class foo;
Note the link and syntax highlighting!