Skip to content

Instantly share code, notes, and snippets.

Avatar

Stanislav Lukeš exyi

  • CZ
View GitHub Profile
@exyi
exyi / client.ts
Created Feb 23, 2021
websocket basic client
View client.ts
/// <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,
@exyi
exyi / strom.py
Created Sep 15, 2020
Intervaláče
View strom.py
from __future__ import annotations
from dataclasses import dataclass
from typing import *
import unittest
View memtest.cs
// 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
View memtest.md
View keybase.md

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:

@exyi
exyi / dotvvm_src_.vscode_tasks.json
Created Aug 2, 2017
dotvvm/src/.vscode/tasks.json
View 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",
@exyi
exyi / dotvvm_src_.vscode_launch.json
Created Aug 2, 2017
dotvvm/src/.vscode/launch.json
View 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": [],
View stack-overflow-exception
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 / TreeView.cs
Created Jul 13, 2016
simple server rendred TreeView control for dotvvm
View TreeView.cs
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); }
@exyi
exyi / BF.ts
Created Feb 4, 2016
Brainfuck in ts
View BF.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]--;