Skip to content

Instantly share code, notes, and snippets.

View sibelius's full-sized avatar
🦈
give me a feedback https://entria.feedback.house/sibelius

Sibelius Seraphini sibelius

🦈
give me a feedback https://entria.feedback.house/sibelius
View GitHub Profile
@sibelius
sibelius / changelog.ts
Created January 23, 2024 16:30
create a feature-production/ branch to release to production, also create a new tag
import { exec as execCb } from 'child_process';
import dotenvSafe from 'dotenv-safe';
import fs from 'fs';
import moment from 'moment';
import path from 'path';
import semver from 'semver';
import util from 'util';
// eslint-disable-next-line
import git from 'simple-git';
// eslint-disable-next-line
@sibelius
sibelius / paragraph.md
Created January 17, 2024 14:57
paragraph structure
id title tags
paragraph
Paragraph structure
writing

import Embed from '../../src/Embed';

@sibelius
sibelius / programming-as-theory-building.md
Created January 2, 2024 20:16 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@sibelius
sibelius / acl.json
Last active December 12, 2023 19:45
acl s3 mongo backup staging
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
@sibelius
sibelius / rspack.many.js
Created November 30, 2023 14:13
trying to bundle many frontends in a single webpack
module.exports = merge(rspackDevConfig, {
entry: {
main: './src/index.tsx',
login: '../login/src/index.tsx',
console: '../console/src/index.tsx',
},
devServer: {
port: PORT,
...getOpen('/home'),
...getProxy(),
@sibelius
sibelius / PixDynamic.tsx
Created October 20, 2023 01:07
useOpenpix
import { useEffect, useState } from 'react';
const value = 100;
const PixDynamic = () => {
const [giftbackValue, setGiftbackValue] = useState(null);
const [giftbackHash, setGiftbackHash] = useState(null);
const [shopperId, setShopperId] = useState(null);
const [modal, setModal] = useState<boolean>(true);
@sibelius
sibelius / timeSpan.ts
Created September 28, 2023 15:49
timeSpan
import convertHrtime from 'convert-hrtime';
export const timeSpan = () => {
const start = process.hrtime();
const end = (type) => convertHrtime(process.hrtime(start))[type];
const returnValue = () => end('milliseconds');
returnValue.rounded = () => Math.round(end('milliseconds'));
returnValue.seconds = () => end('seconds');
returnValue.nanoseconds = () => end('nanoseconds');
@sibelius
sibelius / nodeScript.ts
Created June 27, 2023 20:21
basic node script
const run = async () => {
};
(async () => {
try {
await run();
} catch (err) {
// eslint-disable-next-line
console.log(err);
@sibelius
sibelius / monkeyPatchAggregateApm.ts
Created May 5, 2023 16:24
monkeyPatchAggregateApm
export const monkeyPatchAggregateApm = (M: Model<any>) => {
const aggregate = M.aggregate;
M.aggregate = async (pipeline: Array<any>) => {
const spanName = `${M.collection.collectionName}.aggregate`;
const span = apm.startSpan(spanName);
if (span) {
span.setLabel('pipeline', JSON.stringify(pipeline));
}
@sibelius
sibelius / questions.md
Last active March 20, 2023 22:46
How would you answer that? send in a reply or to me in a DM

1. What is your name, location, and age?

2. Are you currently employed? When would you be available to start?

3. Can you briefly describe (1 to 2 paragraphs) your professional experience? Where have you worked before, what were your responsibilities, etc.?

4. This position requires prior experience in management and leadership. Have you ever led a team in an Engineering Manager or similar role?

5. How would you ensure the efficient delivery of high-quality software products within tight deadlines?