Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@alicebartlett
alicebartlett / Hiring-links.md
Last active November 26, 2018 03:41
A while ago I asked twitter for resources on hiring, here are some links:
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know

io-logo-substack

  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
@rbowen
rbowen / betterfm.md
Last active February 5, 2017 09:15
RTFM? Write a Better FM

RTFM? Write a Better FM.

Have you ever noticed that the communities where you’re told the most frequently to RTFM - Read The F* Manual - are the same ones where that manual is likely to be awful? I believe that this is, in fact, not merely correlation, but also causation - that is, the attitude results in the poor docs.

The Setup - Why we need a better manual

There’s a few commonly held beliefs about documentation for software, and in particular open source software: 1) It’s awful, 2) Nobody ever wants to write it. 3) That’s just the way things are, and we can’t do much about it.

The reality, however, is that there are lot of people that want to write documentation, and we, the gatekeepers of open source projects, just make it too hard for them to do it. We put up artificial social barriers. (For example, the myth that documentation is a somehow less important contribution than “real” code.) We put up strange workflows. (Get a checkout. Make your changes. Make a diff. Subscribe to a mailing list. Sen

// built files are found at /public/__build__/*
// how do I get `webpack` to build to `public/__build__/`
// but have the webpack dev server serve `public/index.html`
// and the bundles from `/__build__/`?
//
// I'm using this to run the server
//
// webpack-dev-server --inline --content-base public/
//
// and this is my config:
@tkafka
tkafka / LICENSE.txt
Last active September 5, 2019 13:38
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

New Javascript Structure

└── app
    └── javascripts
         ├── bower_components
         ├── bundles
         │   └── <bundle-name>
 │ └── tests