Skip to content

Instantly share code, notes, and snippets.

// Copyright (c) 2013-2014 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#ifndef SSVU_BIMAP
#define SSVU_BIMAP
#include <cassert>
#include <map>
#include <set>
#include <iostream>
#include <set>
#include <utility>
#include <cstddef>
#include <SSVUtils/SSVUtils.hpp>
namespace Internal
{
template<typename T> struct PtrComparator
{
#!/bin/sh
cd "/home/vittorioromeo/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot Games/League of Legends/RADS/system/"
wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe
#include <SSVUtils/SSVUtils.hpp>
namespace Eng
{
template<typename TTokenType, typename TTokenDataType, typename TASTType> struct LangSpec
{
using TokenType = TTokenType;
using TokenDataType = TTokenDataType;
using ASTType = TASTType;
};
@vittorioromeo
vittorioromeo / test.asm
Created May 5, 2014 09:01
x86 print/write tests
section .data
str: db 100
section .bss
section .text
global _start
_start:
#include <SSVUtils/SSVUtils.hpp>
using Idx = std::size_t;
using Ctr = int;
struct Manager;
class Handle;
struct Impl
{
#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
{
; 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
@vittorioromeo
vittorioromeo / touhou.sh
Created May 20, 2014 09:13
running touhou on asus laptop
#!/bin/bash
function finish
{
xmodmap -e 'keycode 54=c'
}
trap finish EXIT
xmodmap -e 'keycode 54=x'
export WINEDEBUG=-all
WINEDEBUG=-all optirun wine "$@"
#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