Skip to content

Instantly share code, notes, and snippets.

View BorisTB's full-sized avatar
🦠
vibin'

Boris BorisTB

🦠
vibin'
  • Prague, Czech Republic
View GitHub Profile
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active May 18, 2024 15:37
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@rdeak
rdeak / docker-compose.yml
Created February 19, 2021 20:21
List of popular server images
version: '2.4'
volumes:
esdata:
driver: local
networks:
backend:
driver: bridge
@colinhacks
colinhacks / _document.tsx
Last active January 12, 2023 16:44
How to support server-side rendering for plain "emotion" package in Next.js
// ⚠️ works with Emotion 10 only! ⚠️
// 1. `yarn add emotion-server`
// 2. copy the contents of this file into your `pages` directory
// 3. save it as `_document.tsx`
// should work out of the box
import Document, { Head, Main, NextScript } from 'next/document';
@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active June 3, 2024 19:06
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@peteroupc
peteroupc / LineReader.js
Last active November 22, 2022 04:05
JavaScript class for reading files line by line in HTML5 apps
/*
Written by Peter O.
Any copyright to this work is released to the Public Domain.
In case this is not possible, this work is also
licensed under Creative Commons Zero (CC0):
https://creativecommons.org/publicdomain/zero/1.0/
*/
@mattkahl
mattkahl / twig.async.js
Last active March 16, 2017 08:23
An asynchronous implementation of twigjs that returns a Promise on instantiation if the template is asynchronous. Works just like twig(), but when instantiated, twigAsync returns a Promise. The twig template is passed as the only parameter when resolving the Deferred object.
/**
* twig.async.js
*
* An asynchronous implementation of twigjs that returns a Promise on instantiation if the template is asynchronous.
* Works just like twig(), but when instantiated, twigAsync returns a Promise. The twig template
* is passed as the only parameter when resolving the Deferred object.
*
* e.g.
* tpl = twigAsync({href:'/templates/profile/profile-welcomeNewDesign.twig'});
* $.when(tpl).done(function(twigTemplate){