Skip to content

Instantly share code, notes, and snippets.

View kaworu's full-sized avatar

Alexandre Perrin kaworu

View GitHub Profile
@kaworu
kaworu / t.s
Created September 19, 2017 09:34
s=>[...s].reduce((m,x)=>m+x.charCodeAt(),0)%42?"N":"Y"
@kaworu
kaworu / t.c
Created September 19, 2017 07:21
main(int n,char**v){for(char*p=v[1];*p;p++)n+=*p;puts((n-2)%42?"":"Y");}
#include <iostream>
class Rack {
public:
Rack(int i): m_i(i)
{ }
int geti()
@kaworu
kaworu / Rack.cpp
Last active September 8, 2017 13:57
#include <iostream>
class Rack {
public:
Rack(int i): m_i(i)
{ }
int geti()
#include <stdio.h>
struct foo {
int member;
};
int
main(int argc, char **argv)
{
@kaworu
kaworu / di.c
Last active July 18, 2017 09:13
#include <stdio.h>
struct foo {
int member;
};
int
main(int argc, char **argv)
{
"use strict";
const express = require("express");
const app = express();
app.get('/api/users/:user_id/pictures/:picture_id', function (req, res) {
User.findById(req.params.user_id).then(() => {
Picture.findById(req.params.picture_id).then() => {...}});
});
diff --git a/day3/app.js b/day3/app.js
index 637f47f..a9a5700 100644
--- a/day3/app.js
+++ b/day3/app.js
@@ -6,6 +6,7 @@
const express = require('express');
const bodyParser = require('body-parser');
const mongoose = require("mongoose");
+const MongoClient = require("mongodb").MongoClient;
/* our applications modules */
@r1@
type T;
position p;
identifier i;
constant c1, c2, c3;
@@
T i@p[
(
c1
quirc test program
Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com>
Library version: 1.0
Time (ms) Count
Filename Load ID Total ID Dec
-------------------------------------------------------------------------------
version=01,level=H,mode=ALNUM.png: 0 3 3 1 1
version=01,level=H,mode=BYTE.png: 0 3 3 1 1
version=01,level=H,mode=KANJI.png: 0 2 2 1 1