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
@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){
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 19, 2025 10:53
A badass list of frontend development resources I collected over time.
@peteroupc
peteroupc / LineReader.js
Last active August 17, 2024 10:43
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/
*/
@bcoe
bcoe / npm-top.md
Last active March 21, 2025 03:49
npm-top.md

npm Users By Downloads (git.io/npm-top)


npm users sorted by the monthly downloads of their modules, for the range May 6, 2018 until Jun 6, 2018.

Metrics are calculated using top-npm-users.

# User Downloads
@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active May 27, 2025 13:19
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');
@ww9
ww9 / one-line-text-art-and-emojis_utf8_ascii.txt
Last active June 4, 2025 13:04
Emojis, UTF8, ASCII (one line) #misc
# Collection of one line text art (◕‿◕✿)
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗
ּבּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
@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';
@Zekfad
Zekfad / conventional-commits.md
Last active June 24, 2025 09:23
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@siakaramalegos
siakaramalegos / prettier.md
Last active January 24, 2025 13:59
Adding Prettier to a project

Adding Prettier to a Project

Basic steps for adding Prettier to a project and setting up a pre-commit hook when not using any other linter. Most of these steps can be found in the docs and through other links in the docs.

  1. Install prettier:
$ npm install --save-dev --save-exact prettier
  1. Create an empty config file to let tools know you're using Prettier:
@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