Skip to content

Instantly share code, notes, and snippets.

View mcocoba's full-sized avatar
🏀

Manny Cocoba mcocoba

🏀
View GitHub Profile
@mcocoba
mcocoba / clean_code.md
Created April 24, 2022 07:54 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

### Keybase proof
I hereby claim:
* I am mcocoba on github.
* I am mcocoba (https://keybase.io/mcocoba) on keybase.
* I have a public key ASDMIjdYaWH-GHlsVjC8JdCVaz-B4dCQHW6uGMKvigjNwgo
To claim this, I am signing this object:
@mcocoba
mcocoba / Gemfile
Created July 29, 2020 07:06 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
postEvent(data, callbackFN, errorFN){
let event_data = new FormData();
Object.keys(data).forEach((key) => {
if (data[key] instanceof FileList) {
event_data.append(`event[${key}]`, data[key][0], data[key][0].name);
}
else {
if(key == 'attachments_attributes'){
@mcocoba
mcocoba / webpack.config.js
Created November 27, 2016 23:35 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"