Skip to content

Instantly share code, notes, and snippets.

@PkmX
PkmX / Main.hs
Last active August 29, 2015 14:21
{-# LANGUAGE OverloadedStrings, TupleSections #-}
import Control.Monad
import Control.Lens
import Data.Function
import Data.List
import Data.Ord
import qualified Data.Text.Lazy.IO as TL
import qualified Text.Taggy.Lens as T
@PkmX
PkmX / Makefile
Last active August 29, 2015 14:20
OSDI Lab8
ifneq ($(KERNELRELEASE),)
obj-m := lab8.o
else
KERNELDIR ?= linux-2.6.32.60
PWD := $(shell pwd)
SPACE :=
SPACE +=
eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
@PkmX
PkmX / main.cpp
Last active August 29, 2015 14:20
// clang++/g++ -std=c++14 -Wall -Wextra -pedantic -O3 -march=native -fno-builtin
#include <cstring>
#include <chrono>
#include <iostream>
#include <string>
#include <vector>
#include <x86intrin.h>
size_t avx2_strlen(const char* const s) {
static_assert(__AVX2__, "AVX2 is not supported");
@PkmX
PkmX / PKGBUILD
Last active August 29, 2015 14:19
# Contributor: Juan Diego Tascon
# Contributor: PkmX <[email protected]>
pkgname=artoolkit
pkgver=2.72.1
pkgrel=8
pkgdesc="Augmented Reality ToolKit"
arch=('i686' 'x86_64')
url="http://www.hitl.washington.edu/artoolkit/"
license=('GPL')
#!/usr/bin/env bash
set -e
mkdir -p initramfs{/,/bin,/dev,/etc,/proc,/sbin,/sys,/usr,/usr/bin,/usr/sbin}
pushd initramfs
if [[ ! -x sbin/busybox ]]; then
wget -O sbin/busybox http://www.busybox.net/downloads/binaries/latest/busybox-x86-64
// Compile with clang++ -std=c++14
#include <functional>
struct foo {
// Implicitly compiler-generated default destructor
// ~foo() { }
};
template<typename T>
# Maintainer: Robert La Spina <rkidlaspina [at] gmail [dot] com>
# Contributor: MP2E <MP2E {AT] archlinux.us>
# Contributor: PkmX <[email protected]>
#
# TODO: Find a way to put engine plugins in /usr/lib/$pkgname.
pkgname=doomseeker
pkgver=1.0
pkgrel=1
pkgdesc='A cross-platform server browser for various multiplayer Doom source-ports.'
# Maintainer: Robert La Spina <rkidlaspina at gmail dot com>
# Based on the skulltag package by Mikael Eriksson <[email protected]>
# and Sean Streeter <anubis2591 at gmail dot com>
pkgname=zandronum
pkgver=2.0
pkgrel=1
pkgdesc="OpenGL ZDoom port with Client/Server multiplayer."
arch=('i686' 'x86_64')
url="http://zandronum.com/"
license=('custom')
| | | | |-- 1.$plus(2).$times BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value res2 in $iw)
| | | | | |-- 1.$plus(2) EXPRmode-POLYmode-QUALmode (silent: value res2 in $iw)
| | | | | | |-- 1.$plus BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value res2 in $iw)
| | | | | | | |-- 1 EXPRmode-POLYmode-QUALmode (silent: value res2 in $iw)
| | | | | | | | \-> Int(1)
| | | | | | | \-> (x: Double)Double <and> (x: Float)Float <and> (x: Long)Long <and> (x: Int)Int <and> (x: Char)Int <and> (x: Short)Int <and> (x: Byte)Int <and> (x: String)String
| | | | | | |-- 2 BYVALmode-EXPRmode (silent: value res2 in $iw)
| | | | | | | \-> Int(2)
| | | | | | [adapt] (x: Int)Int adapted to 3
| | | | | | \-> Int(3)
@PkmX
PkmX / main.c
Created January 17, 2015 12:54
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
int x = 0;
int main(void)
{
int y = 0;