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
'use strict'
const assert = require('assert')
const Kue = require('kue')
class Queue {
constructor (options) {
options = options || {}
this.prefix = options.prefix || 'store'
this.redis = options.redis || {}
'use strict'
const assert = require('assert')
const EventEmmiter = require('events')
class SimpleQueue extends EventEmmiter {
constructor (options) {
super()
options = options || {}
'use strict'
const Bull = require('bull')
const co = require('co')
const EventEmitter = require('events')
class Queue extends EventEmitter {
constructor (options) {
super()
@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": {
@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 / .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 / 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 / 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 / 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",
upstream apiServer {
server localhost:3000;
}
upstream appServer {
server localhost:4000;
}
upstream adminServer {
server localhost:4050;