Skip to content

Instantly share code, notes, and snippets.

View vainamov's full-sized avatar
🏄
Hejsan!

Fabian Krahtz vainamov

🏄
Hejsan!
View GitHub Profile
@vainamov
vainamov / Embed.middleware.ts
Created July 23, 2019 15:29
Mongoose Embed Middleware
import { NextFunction, Request, Response } from "express";
declare module "express" {
interface Request {
embed: { path: String, fields?: String }[]
}
}
export function EmbedMiddleware(req: Request, res: Response, next: NextFunction): void {
req.embed = [];
{
"FunctionalItems": [],
"GearItems": [
{
"ItemType": 3,
"ArmorPoints": 100,
"ArmorWeight": 0,
"ItemClass": 15,
"ID": 1001,
"Name": "Suit of Agent Xenon [Limited]",
@vainamov
vainamov / Qub.ino
Last active January 18, 2017 16:46
#include "Qub.h"
#include "numbers.h"
String matNumber = "70453310";
Qub qub;
int mode = 0;
int ledState = LOW;
long previousMillis = 0;
@vainamov
vainamov / Numbers.h
Last active November 17, 2016 09:05
#define number_0 { \
{0, 0, 0}, \
{0, 0, 0}, \
{0, 0, 1} \
}
#define number_1 { \
{0, 0, 0}, \
{0, 1, 0}, \
{0, 0, 0} \
const int layers[] = {11, 12, 13};
const int columns[] = {2, 3, 4, 5, 6, 7, 8, 9, 10};
void setup() {
for(int c: columns) {
pinMode(c, OUTPUT);
}
for(int l: layers) {
pinMode(l, OUTPUT);
}

Keybase proof

I hereby claim:

  • I am vainamov on github.
  • I am vainamo (https://keybase.io/vainamo) on keybase.
  • I have a public key whose fingerprint is 539F 9BF1 7CAF 0E97 5F3D 06F2 C79C 91D8 E310 9960

To claim this, I am signing this object: