Skip to content

Instantly share code, notes, and snippets.

View markotom's full-sized avatar
🎨
refactoring is coding with style

Marco Godínez markotom

🎨
refactoring is coding with style
View GitHub Profile
@markotom
markotom / tasking-draft.md
Created August 13, 2021 02:35
Draft for a possible JS library for tasking/scripting

Draft for a possible JS library for tasking/scripting

For a simple task:

const task = new Task.Simple();

task.setHandler((ctx) => {
  // doing something
});
@markotom
markotom / Dockerfile
Created October 28, 2019 21:05
docker compose & marble seeds
FROM node:8-alpine
RUN apk add python gcc g++ make curl
ARG WORKING_DIR=/var/www
RUN mkdir -p $WORKING_DIR
WORKDIR $WORKING_DIR
COPY package.json $WORKING_DIR
RUN npm install
acta8-de(992,22,1312,69) cabildo(1342,23,1623,70) 321(2433,21,2512,68) obrero(34,694,139,717) tnbtr(157,698,250,716) de(20,723,52,745) propios(65,722,177,749) ol(187,722,208,744) o(221,726,251,744) flor(21,752,70,774) ilnn(79,751,135,773) tr-ncli(150,750,250,772) cu(22,787,50,803) lip(59,780,90,800) lorrcs(102,784,192,801) maii(200,784,248,801) turen(21,812,107,832) en(18,860,49,877) ivchu(61,854,145,876) riia(162,853,205,876) ne(219,859,249,877) in(19,884,40,905) notlrioi(54,883,168,904) el(179,883,201,903) na(214,887,250,905) trido(22,911,97,934) xefturiloi(108,910,247,934) lrhncihlt(22,941,157,963) ltle(168,940,200,961) torre(213,943,239,960) ti(89,973,124,990) lt1(137,968,163,989) buii(196,968,249,991) ligtiie(19,998,115,1023) ti'htn(132,998,203,1019) tio(215,997,249,1019) kl(49,1109,76,1132) mñnr(99,1109,186,1132) km(197,1110,249,1132) kr(21,1144,67,1166) nimo(86,1139,166,1161) lopoz(176,1133,249,1165) lililc(21,1166,79,1193) iloond(104,1166,218,1189) jmni(21,1201,86,1223) kmr(113,1200,177,1217) u(204,12
upstream apiServer {
server localhost:3000;
}
upstream appServer {
server localhost:4000;
}
upstream adminServer {
server localhost:4050;
@markotom
markotom / pagina.json
Last active August 13, 2019 19:30
hndm samples
{
"_id": "558a33097d1ed64f168f0533",
"titulo": "Águila Mexicana",
"publicacion_id": "558075bd7d1e63c9fea1a0f3",
"tipoAcceso": true,
"estatus": 1,
"pais": "México",
"idioma": "Español",
"estado": "Distrito Federal",
"ciudad": "Ciudad de México",
@markotom
markotom / ambient.001.js
Created June 11, 2018 01:48
Baudio Experiment
let c3 = 130.81
let c4 = 261.63
let e3 = 164.81
let e4 = 329.628
let b2 = 123.47
let b4 = 493.88
let melody1 = [c3, e3, b2, c3]
let melody2 = [e4, e4, b4, c4]
let melody3 = [[e4, 3], [e4, 4], [b4, 2], [c4, 6]]
@markotom
markotom / columns-template.js
Last active October 16, 2023 04:25
Create column form layout using react-jsonschema-form and marble-seed
import React, { Component } from 'react'
import api from '~base/api'
import classNames from 'classnames'
import {
BaseForm,
TextWidget,
EmailWidget,
NumberWidget
} from '~base/components/base-form'
@markotom
markotom / .functions
Created March 24, 2017 08:47
Open Sublime Text from command line
function s() {
if [ $# -eq 0 ]; then
subl .;
else
subl "$@";
fi;
}
@markotom
markotom / .functions
Created March 24, 2017 08:46
Open Visual Studio Code from command line
function vs {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code" .
else
local argPath="$1"
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
open -a "Visual Studio Code" "$argPath"
fi
}
@markotom
markotom / payload.json
Last active March 14, 2018 06:41
Create token from server instead browser: https://www.conekta.io/es/docs/referencias/conekta-js
{
"auth_token": "key_FP3nXcyUyqef8xsZJkbpTjQ",
"conekta_client_user_agent": "{\"agent\":\"Conekta JavascriptBindings/0.3.0\"}",
"card": {
"number": "4242424242424242",
"name": "Javier Pedreiro",
"exp_year": "2020",
"exp_month": "12",
"cvc": "123",
"address": {