Skip to content

Instantly share code, notes, and snippets.

@nabijaczleweli
nabijaczleweli / keybase.md
Last active August 29, 2015 14:28
My Keybase proof

Keybase proof

I hereby claim:

  • I am nabijaczleweli on github.
  • I am nabijaczleweli (https://keybase.io/nabijaczleweli) on keybase.
  • I have a public key whose fingerprint is 7D69 474E 8402 8C5C C0C4 4163 BCFD 0B01 8D26 58F1

To claim this, I am signing this object:

@nabijaczleweli
nabijaczleweli / gaemsaev
Created July 27, 2015 22:18
Default saev
16 16
{x=4,y=13} =
{x=5,y=13} =
{x=6,y=13} =
{x=7,y=13} =
{x=8,y=13} =
{x=10,y=14} =
{x=11,y=14} =
@nabijaczleweli
nabijaczleweli / asdf.cpp
Created July 25, 2015 16:59
Find first unlocked mutex
#include <mutex>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
vector<mutex> mutexes(20);
for(int i = 0; i < 10; ++i)
if(bugfree::Context * curctx = bugfree::Context::GetCurrentContext())
curctx->GoToShit();
@nabijaczleweli
nabijaczleweli / asdf.cpp
Created July 8, 2015 16:58
Why LINUX-based OSs are bad
void f00() {
throw 'f';
}
@nabijaczleweli
nabijaczleweli / Makefile
Last active August 29, 2015 14:24
Indoctrinating @Nooble part 1
# I normally put this in a separate file, but v0v
ifeq "$(OS)" "Windows_NT"
devnull := nul
DLL := .dll
MKDIR := busybox mkdir
PIC :=
PREDLL =
FIND = busybox find
else
devnull := /dev/null
@nabijaczleweli
nabijaczleweli / .clang-format
Created July 1, 2015 10:30
nabijaczleweli's one true code style
---
Language : Cpp
BasedOnStyle : LLVM
AlignAfterOpenBracket : true
AlignEscapedNewlinesLeft : true
AlignConsecutiveAssignments : true
AllowShortFunctionsOnASingleLine : Empty
AlwaysBreakTemplateDeclarations : true
ColumnLimit : 160
ConstructorInitializerIndentWidth : 6
@nabijaczleweli
nabijaczleweli / variadic-template-iterate.hpp
Last active June 13, 2021 21:35
Iterate over all elements of variadic template
#include <cstddef>
#include <utility>
template<class T, class... TT>
struct over_all {
using next = over_all<TT...>;
static const constexpr std::size_t size = 1 + next::size;
template<class C>