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
inline void * operator new(std::size_t n) | |
{ | |
return malloc(n); | |
} | |
inline void operator delete(void * p) noexcept | |
{ | |
free(p); | |
} | |
inline void *operator new[](std::size_t s) |
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
template<typename TDerived> class VecBase | |
{ | |
private: | |
inline auto& getTD() noexcept { return reinterpret_cast<TDerived&>(*this); } | |
inline const auto& getTD() const noexcept { return reinterpret_cast<const TDerived&>(*this); } | |
public: | |
template<typename T> inline bool has(const T& mValue) const noexcept { return getTD().is(getTD().lookup(mValue), mValue); } | |
inline auto& getData() noexcept { return getTD().data; } |
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
#!/bin/bash | |
function finish | |
{ | |
xrandr --output HDMI-0 --off | |
xrandr --output DVI-I-0 --off | |
xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 0x0 | |
xrandr --output DVI-I-0 --mode 1680x1050 --pos -1920x0 | |
} |
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
#define SSVU_IMPL_SINK_MN(mIT) SSVPP_TPL_ELEM(mIT, 0) | |
#define SSVU_IMPL_SINK_PN(mIT) SSVPP_TPL_ELEM(mIT, 1) | |
#define SSVU_IMPL_SINK_P_CR(mIT) const decltype(SSVU_IMPL_SINK_MN(mIT))& SSVU_IMPL_SINK_PN(mIT) | |
#define SSVU_IMPL_SINK_P_RV(mIT) decltype(SSVU_IMPL_SINK_MN(mIT))&& SSVU_IMPL_SINK_PN(mIT) | |
#define SSVU_IMPL_SINK_P_INIT(mIT) SSVU_IMPL_SINK_MN(mIT){SSVU_IMPL_SINK_PN(mIT)} | |
#define SSVU_DEFINE_SINK_CTOR_1(mClassName, mCode, m0) \ | |
inline mClassName(SSVU_IMPL_SINK_P_CR(m0)) : SSVU_IMPL_SINK_P_INIT(m0) mCode \ | |
inline mClassName(SSVU_IMPL_SINK_P_RV(m0)) : SSVU_IMPL_SINK_P_INIT(m0) mCode |
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
#!/bin/bash | |
function finish | |
{ | |
xmodmap -e 'keycode 54=c' | |
} | |
trap finish EXIT | |
xmodmap -e 'keycode 54=x' | |
export WINEDEBUG=-all | |
WINEDEBUG=-all optirun wine "$@" |
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: linux print implementation | |
%macro MC_linuxPrintImpl 3 | |
mov ebx, %1 ; | <- print target (1=stdout) | |
mov eax, 4 ; Print 100 bytes starting from str | |
mov ecx, %2 ; | <- source buffer | |
mov edx, %3 ; | <- number of characters to print | |
int 80h ; \___ | |
%endmacro | |
; MACRO: read from terminal |
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 <SSVUtils/SSVUtils.hpp> | |
using Idx = std::size_t; | |
using Ctr = int; | |
template<typename> class Manager; | |
template<typename> class Handle; | |
template<typename T> class Atom | |
{ |
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 <SSVUtils/SSVUtils.hpp> | |
using Idx = std::size_t; | |
using Ctr = int; | |
struct Manager; | |
class Handle; | |
struct Impl | |
{ |
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
section .data | |
str: db 100 | |
section .bss | |
section .text | |
global _start | |
_start: |
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 <SSVUtils/SSVUtils.hpp> | |
namespace Eng | |
{ | |
template<typename TTokenType, typename TTokenDataType, typename TASTType> struct LangSpec | |
{ | |
using TokenType = TTokenType; | |
using TokenDataType = TTokenDataType; | |
using ASTType = TASTType; | |
}; |