Skip to content

Instantly share code, notes, and snippets.

View Marcisbee's full-sized avatar
:octocat:
Current jam: TS, Graphql, Deno, Go

Marcis Bergmanis Marcisbee

:octocat:
Current jam: TS, Graphql, Deno, Go
View GitHub Profile
@Marcisbee
Marcisbee / download.sh
Created January 10, 2025 00:19
Download pre-built binaries from github releases with single command
#!/bin/bash
# Ensure TMP_DIR is cleaned up on exit
cleanup() {
rm -rf "$TMP_DIR"
}
trap cleanup EXIT
# Validate repo name function
validate_repo_name() {
@Marcisbee
Marcisbee / index.tsx
Created February 18, 2023 16:08
Experimental API for FE framework
const counter = new (class extends Exome {
count = 0
increment() {
this.count += 1
}
})
function Counter({
counter: { count, increment } = counter,
}) {
const user = create({
firstName: String,
lastName: String,
})
const state = create({
user,
})
state.firstName = 'John'
@Marcisbee
Marcisbee / index.jsx
Last active September 18, 2020 21:23
Idea of CSS in JS lib syntax
import { css, hover, setTheme, theme } from 'csx';
import { dark, light } from './themes';
setTheme(light);
const highlight = css({
color: 'red',
backgroundColor: theme.background,
hover: {
@Marcisbee
Marcisbee / double.test.ts
Last active October 15, 2024 10:32
Perfect TS test runner ideas???
import { suite } from 'trest';
import { double, asyncDouble } from './double.ts'
const test = suite('Test suite');
test('Test something', *() => {
(yield double(5)).toBe(10);
});

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: