Skip to content

Instantly share code, notes, and snippets.

View maticzav's full-sized avatar
🎉
Keep moving forward!

Matic Zavadlal maticzav

🎉
Keep moving forward!
View GitHub Profile
import { ExhaustiveSwitchCheck } from '@backend/common'
import { IActionExecution } from './execution'
import { ActionDef, ActionDefPayload, ActionDefResultDict } from './utils'
/**
* A generic interface for a service that can dispatch actions.
*/
export type IDispatcherDefinition<Definitions extends ActionDef> = {
[K in keyof Definitions]: (params: {
data: Definitions[K]['payload']
import { PutObjectCommand, S3Client, GetObjectCommand } from '@aws-sdk/client-s3'
import * as S3 from '@aws-sdk/s3-request-presigner'
import { v4 as uuid } from 'uuid'
import { RandomUtils } from '../lib/utils/random'
export interface IAWSSource {
/**
* Gets upload parameters for a file.
*/
# Write a program that calculates the n-th Fibonnaci number without memoization.
.data
# 0x400
N: .word 9
# 0x404
R: .word 0
.text
# PLAN:
import path from 'node:path'
import fs from 'node:fs/promises'
import { createNoise2D } from 'simplex-noise'
import { createCanvas, createImageData } from 'canvas'
const OUTPUT_PATH = path.join(__dirname, '../../web/public/noise.png')
/**
* Creates a 200x200 canvas with a noise pattern.
import * as React from 'react'
import { NavigationContext, NavigationProp } from '@react-navigation/native'
import { ParamListBase } from '@react-navigation/routers'
/* Registry */
export type Route =
| { name: 'feed' }
| { name: 'meal'; id: string }
| { name: 'login' }
tree 3d3783f0044fd33cdfea2e10a72cc4f0454af71a
parent 4592023935d04f0a60c61b3cae8b2512b772be9b
author maticzav <[email protected]> 1575811005 +0100
committer maticzav <[email protected]> 1575811005 +0100
:sparkles: git article
100644 blob 5c45306b5479a2a138dc950166298151d942d12d Dockerfile
100644 blob 9ca1bd46847f285ec93c57a20a947c32fe7ddc62 README.md
040000 tree 29c27e845ed7383ff53b2ddfbcb8e8715bbaad34 server
100644 blob 1d5458a578fa35941b5ce2c25ea9ee22757cd43e tsconfig.json
@maticzav
maticzav / MacKeyboardAccentFix.sh
Created October 20, 2019 17:23
Fix accent issue with MacBook keyboard
defaults write -g ApplePressAndHoldEnabled -bool true
import {
parse,
CookieParseOptions,
serialize,
CookieSerializeOptions,
} from 'cookie'
import * as next from 'next'
const isBrowser = () => typeof window !== 'undefined'
const isNonEmptyString = (str: string) => str.trim() !== ''
@maticzav
maticzav / tictactoe.elm
Last active April 6, 2019 12:19
TicTacToe game written in Elm
module Main exposing (main)
import Browser
import Html exposing (Html, button, div, table, td, text, tr)
import Html.Attributes exposing (disabled)
import Html.Events exposing (onClick)
import List
import Maybe