Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View amcsi's full-sized avatar
🏠
Working from home

Attila Szeremi amcsi

🏠
Working from home
View GitHub Profile
@amcsi
amcsi / responseEnvelope.ts
Created February 8, 2024 11:06
Response envelope
type ResponseEnvelopeYuki<T> = ResponseEnvelopeSuccess<T> | ResponseEnvelopeFailure;
type ResponseEnvelopeSuccess<T> = {
success: true;
} & T;
type ResponseEnvelopeFailure = {
success: false;
errorMessage: string;
import PrintA from '../PrintA';
export const printConfig = {
A: {
component: PrintA,
nextTransaction: 'B',
},
B
}
<template>
<el-menu v-bind="$attrs">
<slot></slot>
</el-menu>
</template>
<script>
/** @class AMenu */
export default {
name: 'AMenu',
<?php
class ObjectStorage {
public $pairs = [];
public function add(object $objectKey, $value): void
{
$this->pairs[] = [$objectKey, $value];
}
@amcsi
amcsi / rogue.txt
Created December 11, 2021 00:30
Rogue mtg commander deck
Land
1 Access Tunnel
1 Bojuka Bog
1 Command Tower
1 Darkwater Catacombs
1 Dimir Aqueduct
11 Island
1 Myriad Landscape
1 Mystic Sanctuary
1 Path of Ancestry
@amcsi
amcsi / need_deduplication.rs
Created December 10, 2021 21:00
Rust code needing deduplication
impl<'a> SerializingCommon<'a> {
pub fn serialize_page<T>(serialized: &SerializingPage) -> SerializingCommon<'a>
{
SerializingCommon {
ancestors: &serialized.ancestors,
assets: serialized.assets,
components: serialized.components,
content: serialized.content,
description: serialized.description,
draft: serialized.draft,
async function lol() {
const responseBodies = await Promise.all([
fetch('http://example.com/1').then(response => response.json()),
fetch('http://example.com/2').then(response => response.json()),
]);
return {
list: responseBodies[0],
template_something: responseBodies[1],
}
('Single ticket', 350),
('Single ticket bought on the spot', 450),
('Block of 10 tickets', 3000),
('Airport shuttle bus single ticket (100E)', 900),
('Transfer ticket', 530),
('Short section metro ticket for up to 3 stops', 300),
('Single ticket for public transport boat', 750),
('Single ticket for public transport boat Children (under 15)', 550),
('Metropolitan area ticket', 250),
('Metropolitan area single ticket (50 % price discount)', 125),
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
; Custom function to press down two buttons.
PressBoth(a, b)
{
Send, {%a% down}{%b% down}{%a% up}{%b% up}
}
#IfWinActive MELTY BLOOD
@amcsi
amcsi / keybase.md
Created December 15, 2019 12:48
Keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: