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 / 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 / learning.md
Last active January 28, 2022 13:54
Some interesting machine learning and artificial intelligence paper demos
@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 / onegraph.md
Last active June 5, 2021 04:11
Open Sauced Experiments

Fragments

fragment contributionFieldsUser on GitHubActor {
  login
  url
  avatarUrl
}
@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 / 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 / postgres-cheatsheet.md
Created May 7, 2023 01:59 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
# Source: https://gist.github.com/vfarcic/78c1d2a87baf31512b87a2254194b11c
###############################################################
# How To Create A Complete Internal Developer Platform (IDP)? #
# https://youtu.be/Rg98GoEHBd4 #
###############################################################
# Additional Info:
# - DevOps MUST Build Internal Developer Platform (IDP): https://youtu.be/j5i00z3QXyU
# - How To Create A "Proper" CLI With Shell And Charm Gum: https://youtu.be/U8zCHA-9VLA