Skip to content

Instantly share code, notes, and snippets.

View 0-vortex's full-sized avatar
:shipit:
looking out for #0

TED Vortex (Teodor-Eugen Duțulescu) 0-vortex

:shipit:
looking out for #0
View GitHub Profile
@0-vortex
0-vortex / esm-package.md
Created April 2, 2023 14:01 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@0-vortex
0-vortex / api-filter-query.ts
Created August 7, 2022 00:48 — forked from MarZab/api-filter-query.ts
NestJS Filters with Swagger deepObject (example: `?filters[name]=thing1&filters[description]=thing2`)
import { applyDecorators } from '@nestjs/common';
import { ApiExtraModels, ApiQuery, getSchemaPath } from '@nestjs/swagger';
/**
* Combines Swagger Decorators to create a description for `filters[name]=something`
* - has support for swagger
* - automatic transformation with nestjs
*/
// eslint-disable-next-line @typescript-eslint/ban-types,@typescript-eslint/explicit-module-boundary-types
export function ApiFilterQuery(fieldName: string, filterDto: Function) {
@0-vortex
0-vortex / onegraph.md
Last active June 5, 2021 04:11
Open Sauced Experiments

Fragments

fragment contributionFieldsUser on GitHubActor {
  login
  url
  avatarUrl
}
@0-vortex
0-vortex / dotfiles.md
Last active May 13, 2021 04:53
dotfiles with good description, install steps and graph image
@0-vortex
0-vortex / learning.md
Last active January 28, 2022 13:54
Some interesting machine learning and artificial intelligence paper demos
@0-vortex
0-vortex / rules.txt
Last active January 10, 2024 18:05
PerimeterX
// get atob functions
VariableDeclarator StaticMemberExpression[property=atob]
VariableDeclarator[init.type="CallExpression"][init.callee.body.statements.0.body.statements.0.expression.property="atob"]
.closest('VariableDeclarator[init]')
// get atob function aliases
FunctionDeclaration ReturnStatement IdentifierExpression[name="Pu"]
.closest('FunctionDeclaration BindingIdentifier')
CallExpression[callee.type="IdentifierExpression"][callee.name="et"][arguments.length=1][arguments.0.type="LiteralStringExpression"]
@0-vortex
0-vortex / README.md
Last active May 13, 2021 04:57
A high-performance blog template for 11ty - plus NetlifyCMS deployed on GitHub Pages behind Cloudlare CDN

eleventy-high-performance-blog-plus

A high-performance blog template for 11ty - plus NetlifyCMS deployed on GitHub Pages behind Cloudlare CDN

This is a GIST containing the static files for https://avortex.name - it being a demo implementation domain

@0-vortex
0-vortex / keybase.md
Created July 14, 2019 01:20 — forked from webframp/keybase.md
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key