Skip to content

Instantly share code, notes, and snippets.

@SippieCup
SippieCup / cli.ts
Last active February 27, 2026 08:35
#!/usr/bin/env ts-node
import dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
// Parse --env argument BEFORE loading dotenv to ensure correct .env file is loaded
const args = process.argv.slice(2);
const envIndex = args.findIndex((arg) => arg === '--env' || arg === '-e');
@SippieCup
SippieCup / compontent.ts
Last active February 27, 2026 07:11
PrimeNG with Angular Signals
type FilterData = {
dateRange: [DateTime, DateTime];
paymentType: PaymentTypes;
}
@Component({
selector: 'app-root',
template: `
<form>
<p-floatlabel variant="on">
@SippieCup
SippieCup / Handlebars2pdf.ts
Last active December 31, 2025 23:41
Handlebars pdf generation
import fs from 'fs';
import * as path from 'path';
import puppeteer from 'puppeteer';
import handlebars from 'handlebars';
import { CreatePdfRequest } from './types';
import { MILLISECONDS_IN_MINUTE } from '../../timeUtils';
import { PartialTemplate } from '../../../handlebars/types';
/**
@SippieCup
SippieCup / models.ts
Last active September 26, 2025 22:39
Collapse to HasOneThrough
import { Model, InferAttributes, InferCreationAttributes, DataTypes, CreationOptional, NonAttribute } from '@sequelize/core';
import { Attribute, PrimaryKey, NotNull, Table, AutoIncrement, BelongsToMany, AfterFind } from '@sequelize/core/decorators-legacy';
export class PictureSignature extends Model<InferAttributes<PictureSignature>, InferCreationAttributes<PictureSignature>> {
@Attribute(DataTypes.DATE(6))
declare createdAt: CreationOptional<Date>;
@Attribute(DataTypes.INTEGER)
@PrimaryKey
@NotNull
[mcu EBB]
canbus_uuid: a54172e826b0
[board_pins EBB36_G0B1_v1.2]
mcu: EBB
aliases:
aliases_step:
EXT_EN=PD2,EXT_STEP=PD0,EXT_DIR=PD1,EXT_UART=PA15
@SippieCup
SippieCup / transformerToCNNTransformer.py
Last active August 24, 2024 04:23
Example implementation from a basic Transformer model to CNNTransformer.
import torch
import torch.nn as nn
import torch.nn.functional as F
class CNNTransformer(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim, num_layers, kernel_size):
super(CNNTransformer, self).__init__()
self.convs = nn.ModuleList([
nn.Conv1d(in_channels=input_dim if i == 0 else hidden_dim,
out_channels=hidden_dim,
@SippieCup
SippieCup / palettes.scss
Last active March 20, 2024 20:38
Defining multipl palettes, themed & success/warn/danger
@use '@angular/material' as mat;
$md-palette: (
50 : #e3e6ea,
100 : #b9c0cb,
200 : #8a96a9,
300 : #5b6b86,
400 : #374c6c,
500 : #142c52,
@SippieCup
SippieCup / printer.cfg
Last active June 13, 2025 22:01
E5P + Mercury One.1 CoreXY + Sensorless Homing + SKR2 + TFT35 + StealthBurner + Voron Tap + CAN Bus Toolhead + Voron Revo
# This file contains common pin mappings for the BigTreeTech SKR 2.
# To use this config, the firmware should be compiled for the
# STM32F407 with a "32KiB bootloader".
# In newer versions of this board shipped in late 2021 the STM32F429
# is used, if this is the case compile for this with a "32KiB bootloader"
# You will need to check the chip on your board to identify which you have.
#
# The "make flash" command does not work on the SKR 2. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
INT. BATMAN'S PALACE - DAY
Batman is sitting in his throne room, looking out the window. Suddenly, he hears a noise and looks over to see a small, black object flying towards him. He realizes it's a bat and tries to shoo it away, but it keeps coming towards him.
Suddenly, the bat changes course and starts flying around the room in a weird pattern. Batman gets up and tries to follow it, but it's too fast. Suddenly, it stops and hangs upside down from the chandelier.
Batman: What the hell do you want?
The bat just hangs there, eerily silent.
@SippieCup
SippieCup / story 1
Last active September 13, 2022 15:39
AI Powered batman
The scene is set at the batcave. Batman is preparing to go out on patrol.
Alfred: Master Bruce, are you sure you don't want me to go with you?
Batman: No, Alfred. I have to do this alone.
Alfred: But sir, with all the recent attacks on you, I don't think it's wise for you to go out alone.