Skip to content

Instantly share code, notes, and snippets.

View jfalcou's full-sized avatar
👻

Joel Falcou jfalcou

👻
  • University Paris Sud XI, CNRS
  • Orsay, France
View GitHub Profile
#pragma once
#include <vector>
#include <ostream>
template<typename T> struct matrix
{
using value_type = T;
public:
matrix(std::size_t w = 0, std::size_t h = 0)
@jfalcou
jfalcou / arch-linux-install.md
Created April 3, 2021 12:11 — forked from JPenuchot/arch-linux-install.md
Arch install. Up-to-date.

Arch install. Up-to-date.

Simple instructions for an Arch install with encrypted root partition. Bootloader and kernel partitions aren't encrypted.

Network setup

Do whatever is necessary to be able to ping 1.1.1.1. iwctl for wi-fi as of today.

Base filesystem

#include <string_view>
#include <iostream>
template<typename T> struct name_of_
{
static constexpr auto value() noexcept
{
#if defined(_MSC_VER )
std::string_view data(__FUNCSIG__);
auto i = data.find('<') + 1,
#include <iostream>
#include <cmath>
bool ok_to_sum(float a, float b)
{
int exp_a, exp_b;
std::frexp(a, &exp_a);
std::frexp(b, &exp_b);
return std::abs(exp_a - exp_b) <= 23;
@jfalcou
jfalcou / frug.cpp
Created April 29, 2016 14:48
C++ FRUG 07/04/2016
#include <initializer_list>
#include <functional>
#include <iostream>
#include <utility>
#include <tuple>
//--------------------------------------------------------
// Appliquer une fonction sur une ligne d'arguments
template<class F, class...Ts> F for_each_args(F f, Ts&&...a)
{
#include "library_mismatch.hpp"
BOOST_USE_LIBRARY_VERSION(foo,FEATURES2)
int foo() {}
#include <iostream>
#include <type_traits>
#if defined(__unix__)
#include <signal.h>
#include <unistd.h>
#endif
#if (defined(_M_IX86) || defined(__i386__) || defined(_M_IA64) || defined(__ia64__)) && defined(__GNUC__)
#define DEBUG_TRAP() __asm("int3")