Skip to content

Instantly share code, notes, and snippets.

View felipefialho's full-sized avatar
:octocat:
working at @juntossomosmais and @frontendbr 🙃

Felipe Fialho felipefialho

:octocat:
working at @juntossomosmais and @frontendbr 🙃
View GitHub Profile
@terremoth
terremoth / ambb_projects_add_license_badges.php
Created December 10, 2021 20:52
Add license badges to all projects in felipefialho/awesome-made-by-brazilians repo
<?php
$aFile = file('README.md', FILE_TEXT);
$licensed_file = fopen('NEW_README.md', 'wb+');
// Stub: [![license](https://img.shields.io/github/license/AUTHOR/REPO.svg)](/LICENSE)
// pattern to search = ![Stars](https://img.shields.io/github/stars/LarissaAbreu/contrata-se-dev.svg?style=flat-square)
foreach ($aFile as $line_num => $line) {
@shilman
shilman / storybook-docs-typescript-walkthrough.md
Last active February 20, 2024 11:37
Storybook Docs Typescript Walkthrough

Storybook Docs w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.

The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.

Step 1: Initialize CRA w/ TS

npx create-react-app cra-ts --template typescript
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@eduardojmatos
eduardojmatos / frontendbr-forum-top-activity-users.md
Last active May 20, 2020 21:11
List of all users by activities on FrontendBR#forum
@FluffierThanThou
FluffierThanThou / editable.directive.ts
Created April 17, 2017 21:21
angular2 (v4) ckeditor inline directive
import { Directive, ElementRef, Renderer, Input, Output, EventEmitter, forwardRef, AfterViewInit } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
declare let CKEDITOR: any;
@Directive({
selector: '[ckeditable]',
providers: [
{
provide: NG_VALUE_ACCESSOR,
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@felipefialho
felipefialho / css-empty.md
Last active November 24, 2016 20:42
[CSS Trick] Hide dynamic element that break the layout when it is empty.

Hide dynamic element that break the layout when it is empty.

&:empty
  display none

!important, it can't have space on HTML

✌️

@michaelcurry
michaelcurry / rfc-template.md
Created September 29, 2016 18:07
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Type: (feature, enhancement)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)

// ==================================================
// IE Checker
// ==================================================
function isIE(userAgent) {
userAgent = userAgent || navigator.userAgent;
return userAgent.indexOf('MSIE ') > -1 || userAgent.indexOf('Trident/') > -1 || userAgent.indexOf('Edge/') > -1;
}
@jojobyte
jojobyte / ContextCmder-Disable.reg
Last active October 5, 2023 13:13
Cmder Context (Right-Click) Menu for Windows 7, 8, 10 & 11
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]