Skip to content

Instantly share code, notes, and snippets.

@anareyna
anareyna / package.json
Last active December 31, 2019 13:25
webpack 4: Webpack dev server + proxy + hot reloading working
{
"name": "webpack-4-quickstart",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"precommit": "lint-staged",
"dev": "webpack-dev-server --mode development ./src/scripts/index.js --open",
"build": "webpack --mode production ./src/scripts/index.js"
},
"lint-staged": {
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@anareyna
anareyna / hosts
Last active January 4, 2018 21:24
mac apache config (sierra)
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 local.neoauto3.com
var path = require('path')
var webpack = require('webpack')
var WebpackNotifierPlugin = require('webpack-notifier')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
var functions = require('./utils/functions')
var config = require('./utils/config')
{
"persons": [
{
"categories": [
5
],
"lastname": "appeldiod",
"mail": "lozuvywy@hotmail.com",
"names": "nombes",
"sex": "",

Neoauto: Nombramiento de clases

Para el nombramiento de clases se utiliza BEM (Bloque, elemento, modificador) en combinación de prefijos que ayudan a identificar el rol del elemento en todo el sitio.

Se siguen los lineamientos de diseño atómico (Atomic design) y la estructura basada en https://github.com/anareyna/atomic-starter

Prefijos a utilizar:

  • e (elemento)

Puede ser un botón, un input, un encabezado. Se repite potencialmente en todo el sitio, no puede dividirse y por lo general se asocia a un tag HTML (button, input, a)

@anareyna
anareyna / .zshrc
Last active February 8, 2018 02:09
enero 2018 work
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="ys"
@anareyna
anareyna / suit-utils.styl
Created January 12, 2017 20:24
All utility classes as seen on http://suitcss.github.io
.u-alignBaseline
vertical-align baseline !important
.u-alignBottom
vertical-align bottom !important
.u-alignMiddle
vertical-align middle !important
.u-alignTop

Modules

Group of code and data related to a particular piece of functionality. It encapsulates implementation details and exposes a public API, and is combined with other modules to build a larger application.

Goals of modularity

  • Create higher-level abstractions
  • Encapsulation
  • Reusability
  • Simplify dependency management (in some cases every module should declare explicitly all the other dependent modules at the top, we'll see how to improve this)
@anareyna
anareyna / 0_reuse_code.js
Created December 26, 2016 17:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console