This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write a program that calculates the n-th Fibonnaci number without memoization. | |
.data | |
# 0x400 | |
N: .word 9 | |
# 0x404 | |
R: .word 0 | |
.text | |
# PLAN: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tree 3d3783f0044fd33cdfea2e10a72cc4f0454af71a | |
parent 4592023935d04f0a60c61b3cae8b2512b772be9b | |
author maticzav <[email protected]> 1575811005 +0100 | |
committer maticzav <[email protected]> 1575811005 +0100 | |
:sparkles: git article |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100644 blob 5c45306b5479a2a138dc950166298151d942d12d Dockerfile | |
100644 blob 9ca1bd46847f285ec93c57a20a947c32fe7ddc62 README.md | |
040000 tree 29c27e845ed7383ff53b2ddfbcb8e8715bbaad34 server | |
100644 blob 1d5458a578fa35941b5ce2c25ea9ee22757cd43e tsconfig.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write -g ApplePressAndHoldEnabled -bool true | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
parse, | |
CookieParseOptions, | |
serialize, | |
CookieSerializeOptions, | |
} from 'cookie' | |
import * as next from 'next' | |
const isBrowser = () => typeof window !== 'undefined' | |
const isNonEmptyString = (str: string) => str.trim() !== '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
NewerOlder