Skip to content

Instantly share code, notes, and snippets.

@n1xx1
n1xx1 / main.c
Last active December 12, 2015 16:57
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
/** Useless macro boilerplate, I will eventually make it less hacky, I think **/
#define EVAL(...) EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
#define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
#include <iostream>
#include <csetjmp>
class CoroutineImpl {
public:
using CalledFunction = void(*)(CoroutineImpl*);
CoroutineImpl(CalledFunction func) {
m_stackSize = 8 * 1024;
m_stackPointer = malloc(m_stackSize);

Keybase proof

I hereby claim:

  • I am n1xx1 on github.
  • I am n1xx1 (https://keybase.io/n1xx1) on keybase.
  • I have a public key whose fingerprint is A6B4 186F 5308 92F7 8BEB E95F B973 78AD 2375 778D

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<title>Calcola biglietto</title>
</head>
<body>
<form action="http://requestb.in/veydfzve" method="POST">
Cognome: <input name="cognome" value="{{info.cognome if info.post else ''}}"><br>
Nome: <input name="nome" value="{{info.nome if info.post else ''}}"><br>
Numero Persone: <input name="num" value="{{info.num if info.post else ''}}"><br>
macro_rules! linq {
(from ($from:expr) $fromident:ident select ($($select:expr), +) where ($where:expr)) => {{
let mut vec = Vec::new();
for $fromident in &($from) {
if $where {
vec.push(( $( $select ), * ));
}
}
vec
}};
package it.inrebus.skyte.rtcclient;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import org.webrtc.JavaI420Buffer;
import org.webrtc.SurfaceTextureHelper;
package it.inrebus.skyte.rtcclient;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.opengl.GLES20;
import android.opengl.GLUtils;
@n1xx1
n1xx1 / MyThing.cs
Last active December 9, 2018 17:50
public class MyThing {
private void DebugDrawLine(Vector4 a, Vector4 b) {
a = a / a.w;
b = b / b.w;
Gizmos.DrawLine(new Vector3(a.x, a.y), new Vector3(b.x, b.y));
}
private void DebugDrawPolygon(List<Vector4> poly) {
for (int i = 0; i < poly.Count; i++) {
@n1xx1
n1xx1 / main.rs
Created January 29, 2019 02:00
Rust return generic Iterator
fn wrap_vec<'a, T>(v: &'a Vec<T>) -> impl Iterator<Item = String> + 'a where T: std::fmt::Display {
v.iter().map(|s| format!("<{}>", s))
}
fn main() {
let a = vec!["a", "b", "c"];
for s in wrap_vec(&a) {
println!("{}", s);
}
@n1xx1
n1xx1 / webpack.config.js
Last active September 12, 2019 00:47
Alt:V webpack configuration
const WrapperPlugin = require('wrapper-webpack-plugin');
const path = require("path");
const resolve = require("resolve");
const notResolved = {};
const CONFIG = module.exports = {
mode: "development",
devtool: "",
entry: {