Skip to content

Instantly share code, notes, and snippets.

View exyi's full-sized avatar

Standa Lukeš exyi

View GitHub Profile
@exyi
exyi / BF.ts
Created February 4, 2016 15:38
Brainfuck in ts
class Bf {
element: HTMLElement;
exec(script: string, input: string, inputPos = [0], pos = 0, data: number[] = [], ptr = [0]) {
while (script.length > pos) {
switch (script[pos]) {
case '+': data[ptr[0]] = ((data[ptr[0]] | 0) + 1) % 256;
break;
case '-': data[ptr[0]] = ((data[ptr[0]] | 0) - 1) % 256;
break;
case '<': ptr[0]--;
@exyi
exyi / TreeView.cs
Created July 13, 2016 17:26
simple server rendred TreeView control for dotvvm
public interface IHierarchyItem
{
IEnumerable<IHierarchyItem> Children { get; }
}
public class TreeView : DotvvmControl
{
public IEnumerable<IHierarchyItem> DataSource
{
get { return (IEnumerable<IHierarchyItem>)GetValue(DataSourceProperty); }
set { SetValue(DataSourceProperty, value); }
using System;
struct A_1 { public int A; public int B; }
struct A_2 { public A_1 A; public A_1 B; }
struct A_3 { public A_2 A; public A_2 B; }
struct A_4 { public A_3 A; public A_3 B; }
struct A_5 { public A_4 A; public A_4 B; }
struct A_6 { public A_5 A; public A_5 B; }
struct A_7 { public A_6 A; public A_6 B; }
struct A_8 { public A_7 A; public A_7 B; }
struct A_9 { public A_8 A; public A_8 B; }
@exyi
exyi / dotvvm_src_.vscode_launch.json
Created August 2, 2017 11:33
dotvvm/src/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/DotVVM.Samples.BasicSamples.AspNetCore/bin/Debug/netcoreapp1.0/DotVVM.Samples.BasicSamples.AspNetCore.dll",
"args": [],
@exyi
exyi / dotvvm_src_.vscode_tasks.json
Created August 2, 2017 11:34
dotvvm/src/.vscode/tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [ ],
"tasks": [
{
"taskName": "build",

Keybase proof

I hereby claim:

  • I am exyi on github.
  • I am exyi (https://keybase.io/exyi) on keybase.
  • I have a public key ASCQHm65lz9jNqBqcV9qronJnbCKX3AQY5QRoHEYcPwCIAo

To claim this, I am signing this object:

// This source code was generated by anyexec2c.
// Link: https://github.com/exyi/anyexec2C
// ==============================
// tools/memtest.c
// ==============================
// // Part of anyexec2c project
// // https://github.com/exyi/anyexec2C/tree/master/tools
// //
// // Tests memory limits of the sandbox, measured in blocks of BLOCK_SIZE
@exyi
exyi / strom.py
Created September 15, 2020 19:26
Intervaláče
from __future__ import annotations
from dataclasses import dataclass
from typing import *
import unittest
@exyi
exyi / client.ts
Created February 23, 2021 09:20
websocket basic client
/// <reference path="../node_modules/lz-string/typings/lz-string.d.ts" />
import * as P from './protocol'
const endpoint = `ws://${window.location.host}/ws/`
let conn : WebSocket | undefined;
let active = false
let logged = false
export type LoginOptions = {
token: string,