Skip to content

Instantly share code, notes, and snippets.

View r0mai's full-sized avatar

András Kucsma r0mai

  • Prezi
  • Budapest, Hungary
View GitHub Profile
@r0mai
r0mai / # swftools - 2017-07-22_15-49-15.txt
Created July 22, 2017 13:49
swftools on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for swftools on macOS 10.11.6
Build date: 2017-07-22 15:49:15
@r0mai
r0mai / # swftools - 2017-07-22_15-23-49.txt
Created July 22, 2017 13:27
swftools on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for swftools on macOS 10.11.6
Build date: 2017-07-22 15:23:49
@r0mai
r0mai / CMakeCXXCompilerId.cpp
Created September 6, 2016 15:07
ezt probalja forditani
/* This source file must have a .cpp extension so that all C++ compilers
recognize the extension without flags. Borland does not know .cxx for
example. */
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#include <typeinfo>
#include <unordered_map>
#include <string>
#include <cassert>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/seq/elem.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
@r0mai
r0mai / magic_downloader.sh
Created March 14, 2015 21:45
Magic wallpaper downloader
#!/bin/bash
links=$(cat wallpaper-site | grep '/magic/magazine' | grep href | grep -v columns | sed 's#^.*<a href="#http://archive.wizards.com#g' | sed 's#">##g' | sed '/arcana.100/q')
for f in $links; do
name=$(echo $f | sed 's#.*/daily/##g' | sed 's#/#-#g' | sed 's/^M//g');
if ! stat "stuff/$name" > /dev/null; then
curl -o "stuff/$name" $f
fi
done
#include <iostream>
#include <vector>
#include <algorithm>
std::vector<int> nums;
std::vector<std::vector<int>> score;
std::vector<std::vector<char>> direction;
int get_score(unsigned from, unsigned to) {
# Make sure clang++ refers to a templight enabled compiler
clang++ -templight -templight-format xml -c fib.cpp
@r0mai
r0mai / anonymous.hpp
Created August 13, 2014 21:33
anonymous templates
template<class T>
struct Bar {
struct {
template<class U>
struct Foo {};
} x;
struct {
template<class U>
@r0mai
r0mai / absvdi2.c
Created August 4, 2014 17:59
clang214711+templight crash
# 1 "<built-in>"
# 1 "/home/r0mai/build/llvm-214711/llvm/projects/compiler-rt/lib/builtins/absvdi2.c"
/*===-- absvdi2.c - Implement __absvdi2 -----------------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
*===----------------------------------------------------------------------===
@r0mai
r0mai / fib.hpp
Last active August 29, 2015 14:04
Some sample inputs I use when testing metashell with templight (see https://github.com/r0mai/metashell)
template <int N> struct fib { static constexpr int value = fib<N - 2>::value + fib<N - 1>::value; };
template <> struct fib<0> { static constexpr int value = 1; };
template <> struct fib<1> { static constexpr int value = 1; };
template <int N> struct int_ {};