Skip to content

Instantly share code, notes, and snippets.

View guzart's full-sized avatar

Arturo Guzman guzart

View GitHub Profile
@guzart
guzart / inde.html
Created June 24, 2019 20:28
Smashing Dequeue Workshop
<!DOCTYPE html>
<html lang="en">
<head>
<title>Recipe Dashboard</title>
<script src="https://use.fontawesome.com/99d8f1b106.js"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
</head>
<body class="dqpl-no-sidebar">
<div id="app">
<div class="App">
@guzart
guzart / docker-compose.yml
Last active July 27, 2018 16:59
WordPress Theme Development
version: '3.3'
services:
db:
image: mysql:5.6
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@guzart
guzart / XORCipher.js
Last active August 28, 2017 16:20 — forked from sukima/XORCipher.js
A Super simple encryption cipher using XOR and Base64 in JavaScript
// XORCipher - Super simple encryption using XOR and Base64
//
// Depends on [Underscore](http://underscorejs.org/).
//
// As a warning, this is **not** a secure encryption algorythm. It uses a very
// simplistic keystore and will be easy to crack.
//
// The Base64 algorythm is a modification of the one used in phpjs.org
// * http://phpjs.org/functions/base64_encode/
// * http://phpjs.org/functions/base64_decode/
@guzart
guzart / package.json
Created April 16, 2017 00:56
Simple elm production builds
// package.json
{
"scripts": {
"start": "neutrino start",
"build": "neutrino build"
},
"neutrino": {
"use": [
"neutrino-preset-elm"
]
@guzart
guzart / elm-package.json
Created April 16, 2017 00:55
Simple elm production builds
// elm-package.json
{
"source-directories": [
"src"
]
}
@guzart
guzart / index.js
Created April 16, 2017 00:54
Simple elm production builds
// src/index.js
const Elm = require('./Main.elm');
const mountNode = document.getElementById('root');
const app = Elm.Main.embed(mountNode);
@guzart
guzart / init.sh
Last active April 16, 2017 00:53
Simple elm production builds
❯ mkdir src && touch src/index.js
❯ npm init
❯ npm install --save-dev neutrino neutrino-preset-elm
@guzart
guzart / capybara.rb
Last active April 5, 2021 20:13
Capybara configuration to run a webpack dev server for e2e testing
# spec/support/capybara.rb
require 'capybara/rails'
require 'capybara/rspec'
# port and url to webpack server
WEB_TEST_PORT = '5005'.freeze
WEB_TEST_URL = "http://localhost:#{WEB_TEST_PORT}".freeze
def capybara_wait_for_webpack_server
10.times.each do |_|
// @flow
import { flow } from 'lodash';
import { fromJS, Map } from 'immutable';
import type { User, ValidationErrors, WidgetAction } from 'pivot/types';
import * as t from './types';
import * as actions from './actions';
const EMPTY_ERRORS = new Map();

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)