Skip to content

Instantly share code, notes, and snippets.

@johanmendezb
johanmendezb / mermaid-models.json
Last active November 21, 2023 00:48
Big Track model example
classDiagram
class ExtractionState {
name: 'sentToGeology, registeredWithOutGrade, waitingForLaboratoryResult, storageZoneAssigned'
}
class StockPileItem { // Editable in Admin
capacity: number
name: string
}
@johanmendezb
johanmendezb / .stylelintrc
Last active August 8, 2018 11:20
Stylelint rules proposal
{
"rules": {
"max-nesting-depth": 10,
"at-rule-empty-line-before": ["always", {
"ignore": ["first-nested"]
}],
"at-rule-no-vendor-prefix": true,
"at-rule-semicolon-space-before": "never",
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
@johanmendezb
johanmendezb / smooth_scroll_down_jquery.js
Created June 25, 2018 15:08
Simple snipet to add smooth scroll to href's target
$(document).ready(function () {
$('a[href*="#"]')
.not('[href="#"]')
.click(function (e) {
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
var target = $(this.hash)
<form action="https://formspree.io/ta.co9502@gmail.com" class="myform" method="POST" validate>
<div class="row clearfix">
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="form-group">
<label class="control-label">Name</label>
<div class="controls">
<input type="hidden" name="_language" value="es" />
<input name="nombre" placeholder="Tu nombre" class="form-control input-lg requiredField" type="text" data-error-empty="Enter name" required>
</div>
</div>
@johanmendezb
johanmendezb / cotizacion-min.html
Created December 9, 2017 17:14
Archivo minificado para correo de cotización estarter `cotizacion-min.html` y archivo sin minificar `cotizacion.html`
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title>Cotización con Estarter</title><!--[if !mso]><!-- --><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style type="text/css">#outlook a{padding:0}.ReadMsgBody{width:100%}.ExternalClass{width:100%}.ExternalClass *{line-height:100%}body{margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}table,td{border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0}img{border:0;height:auto;line-height:100%;outline:0;text-decoration:none;-ms-interpolation-mode:bicubic}p{display:block;margin:13px 0}</style><!--[if !mso]><!--><style type="text/css">@media only screen and (max-width:480px){@-ms-viewport{width:320px}@viewport{width:320px}}</style><!--<![endif]--><!--[if mso]>
<xml>
<o:Offi
module.exports.loop = function () {
Game.spawns.Spawn1.createCreep([WORK, CARRY, MOVE], 'brianeto', {working: true} );
for(const unit in Game.creeps) {
// defino variables a utilizar a lo largo del ciclo de vida de los creeps
var creep = Game.creeps[unit];
var mine = creep.pos.findClosestByPath(FIND_SOURCES);
var choza = Game.spawns.Spawn1;
@johanmendezb
johanmendezb / test.js
Last active June 14, 2017 13:08
validator library
var expect = require('chai').expect
var Validator = require('../lib/validator')
var is = require('is_js')
describe('Validator validate :)', function() {
it('should return the object if passes', function() {
var values = {email: 'tes@tpepe.com'}
var schema = {
### Keybase proof
I hereby claim:
* I am johanetox on github.
* I am johaneto (https://keybase.io/johaneto) on keybase.
* I have a public key ASA3jhuqjEG_6mT7EpPSLgHZKQ_no6hD9b7lB-PLUgNAeAo
To claim this, I am signing this object:
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title></title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a { padding: 0; }
@johanmendezb
johanmendezb / email.mjml
Created January 13, 2017 23:41 — forked from anonymous/email.mjml
Made with MJML App
<mjml>
<mj-body>
<mj-container background-color="#ffffff" font-size="13px">
<mj-section background-color="#ffffff" hidden="false" name="Nouvelle section" padding-bottom="0" padding-top="20">
<mj-column vertical-align="top" width="100%">
<mj-text align="center" color="#000000" font-size="13px" word-wrap="break-word" font-family="Open Sans" vertical-align="top" container-background-color="#ffffff" padding-left="10" padding-right="10" padding-bottom="0" padding-top="0">
<h2 style="font-size: 19px; font-weight: 700; line-height: 30px;"><span style="font-size:14.666666666666666px;font-family:'Open Sans';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"><span style="font-size:14.666666666666666px;font-family:'Open Sans';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;