Skip to content

Instantly share code, notes, and snippets.

View boxpositron's full-sized avatar
🎯
Focusing

David Ibia boxpositron

🎯
Focusing
View GitHub Profile
@boxpositron
boxpositron / rename_js_files.sh
Created July 4, 2022 19:35 — forked from afternoon/rename_js_files.sh
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@boxpositron
boxpositron / segment-model.md
Last active October 28, 2022 12:47
Tracksend Segments

Segment Model

Proposed segment model design

Requirements

Structure

Proposed mongoose Schema and associated interfaces.

@boxpositron
boxpositron / README.md
Created June 8, 2023 13:32
Partial Interfaces for Component in Typescript

Partial Interfaces Example

type NestedProperty = {
  foo: string;
  bar: string;
};

interface ComponentOptions {
from typing import Optional
def generate_bit_binaries(size: Optional[int] = 8) -> None:
namespace = 2 ** size
for i in range(namespace): # 256 because 2^8 = 256
# Format the number as a binary with leading zeros
binary_format = f"{i:08b}"