Skip to content

Instantly share code, notes, and snippets.

View benedyktdryl's full-sized avatar

Benedykt Dryl benedyktdryl

View GitHub Profile

Here's a cleaned-up version of the project guidelines:

  1. Use "cursor_project_rules" as the Knowledge Base: Always refer to "cursor_project_rules" to understand the context of the project. Do not code anything outside of the context provided in the "cursor_project_rules" folder. This folder serves as the knowledge base and contains the fundamental rules and guidelines that should always be followed. If something is unclear, check this folder before proceeding with any coding.

  2. Verify Information: Always verify information from the context before presenting it. Do not make assumptions or speculate without clear evidence.

  3. Follow "implementation-plan.md" for Feature Development: When implementing a new feature, strictly follow the steps outlined in "implementation-plan.md". Every step is listed in sequence, and each must be completed in order. After completing each step, update "implementation-plan.md" with the word "Done" and a two-line summary of what steps were taken. This ensures a clear

@benedyktdryl
benedyktdryl / Structure.md
Created September 6, 2022 09:22 — forked from hstemplewski/Structure.md
Front-end structure proposal
@benedyktdryl
benedyktdryl / filters.js
Created March 7, 2022 22:46 — forked from deckchairlabs/filters.js
Prisma Custom Generator
#!/usr/bin/env node
const path = require('path')
const generatorHelper = require('@prisma/generator-helper')
const { Project, StructureKind, VariableDeclarationKind } = require('ts-morph')
generatorHelper.generatorHandler({
onManifest(config) {
return {
prettyName: 'Filters',
defaultOutput: path.resolve(__dirname, 'filters'),
// `Omit` omit specific keys from existing interface
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T];
type Omit<T, K extends keyof T> = {[P in Diff<keyof T, K>]: T[P]};
// `Omit` usage
type TCleanedUser = Omit<IUser, 'privateField1' | 'privateField2'>;
@benedyktdryl
benedyktdryl / typescript-react-quickstart.md
Last active June 10, 2017 15:15
Quick notes for people starting with React & Typescript
'use strict'
const fs = require('fs')
const Hapi = require('hapi')
const Http2 = require('http2')
const server = new Hapi.Server()
let listener = Http2.createServer({
key: fs.readFileSync('./key.pem'),
cert: fs.readFileSync('./cert.pem')
})
@benedyktdryl
benedyktdryl / es6-simple-compose.js
Created February 15, 2017 13:22
Simple composition helper for FP in ES6.
const compose = (...callbacks) => (
(...args) => (
callbacks.reduce((prev, callback) => (
[callback(...prev)]
), args)
)
);
compose(
(x) => (x * 2),
@benedyktdryl
benedyktdryl / cloudSettings
Last active July 15, 2020 12:52
Visual Studio Code Sync Settings GIST
{"lastUpload":"2020-07-15T12:52:30.621Z","extensionVersion":"v3.4.3"}
# Just point the sleepimage to your .Trash folder and empty your trash bin after wake up.
# http://apple.stackexchange.com/a/191563
sudo pmset -a hibernatefile ~/.Trash/sleepimage
# Set this to 1 to enable startup
ENABLED=1
# The user to run Kodi as
USER=root
# Adjust niceness of Kodi (decrease for higher priority)
NICE=-5