Skip to content

Instantly share code, notes, and snippets.

@maximvl
maximvl / gist:8f5ffa551a9f9e9d5fab504826c0ab87
Created September 30, 2025 10:13
список идей
Видеоигры
Марио (Super Mario) – Красная кепка и усы / Комбинезон / Супер-гриб.
Линк (Zelda) – Зелёный колпак и уши-эльфа / Туника с поясом / Мастер-меч и щит.
Самус Аран (Metroid) – Шлем с визором / Силовая броня / Рука-пушка.
Лара Крофт (Tomb Raider) – Хвост / Майка и шорты / Два пистолета.
import { goto } from '$app/navigation'
import { EventlabBaseUrl } from '$lib/client'
import {
fetchCurrentUserApiUsersCurrentGetOptions,
loginApiLoginPostMutation
} from '$lib/heyapi/@tanstack/svelte-query.gen'
import { createMutation, createQuery } from '@tanstack/svelte-query'
import { derived, get } from 'svelte/store'
export function createMyUserStore() {
import { goto } from '$app/navigation'
import { EventlabBaseUrl, queryClient } from '$lib/client'
import type { UserItem } from '$lib/heyapi'
import {
fetchCurrentUserApiUsersCurrentGetQueryKey,
getUsersApiUsersGetOptions,
getUsersApiUsersGetQueryKey,
loginApiLoginPostMutation
} from '$lib/heyapi/@tanstack/svelte-query.gen'
import { createMutation, createQuery } from '@tanstack/svelte-query'
-module(dirtest).
-include_lib("wx/include/wx.hrl").
-behaviour(wx_object).
-export([start/0, init/1,
terminate/2, code_change/3,
handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
start() -> wx_object:start_link(?MODULE, [], []).
%% Callbacks
init(Config) ->
wx:new(Config),
[warn] epoll_create: Too many open files
[warn] evutil_make_internal_pipe_: pipe: Too many open files
[err] evsig_init_: socketpair: Too many open files
([email protected])10> Params2.
[{kill_if_fail,true},
{monitor_master,true},
{init_timeout,3000},
{startup_timeout,3000},
{startup_functions,[{erlang,node,[]}]},
{erl_flags,"-pa ../../_build/default/lib/*/ebin -config ../../test/test.config"}]
([email protected])11> ct_slave:start('[email protected]', Params2).
{error,boot_timeout,'[email protected]'}
([email protected])12>
(cl-defun perl-move-cursor (pos &optional buffer)
(let ((window (get-buffer-window buffer t)))
(message "window: %s / pos: %s" window pos)
(if window
(progn
(goto-char pos)
(set-window-point window pos)
(message "char at %s" (point))
(message "char2 at %s" (window-point window)))
(goto-char pos))))
Red [
Author: "Toomas Vooglaid"
Date: 25-9-2017
Description: {Experiments with L-System}
]
ctx: context [
scale: origin: length: len: angle: width: delta-width: times-length: delta-length: delta-angle: aliasing?: stack: commands: none
defaults: [
scale 2.0
origin 300x500
@maximvl
maximvl / abc-score.red
Last active September 27, 2017 03:59
abc score for Red code
Red [
author: {Maxim Velesyuk}
usage: {
abc-score? <block of code>
abc-score? %file.red
abc-score? :some-function
}
description: {
The ABC software metric defines an ABC score as a triplet of values that represent the size of a set of source code statements.
An ABC score is calculated by counting the number of assignments (A), number of branches (B), and number of conditionals (C) in a program.
>> mal/parser/run "{1 2}"
-->
match: [(error: false) any whitespace collect [ahead "("
input: "{1 2}"
match: [any whitespace collect [ahead "(" mal-list (probe
input: "{1 2}"
-->
==> matched
<--
match: [whitespace collect [ahead "(" mal-list (probe "fo