Skip to content

Instantly share code, notes, and snippets.

View mauroquinteros's full-sized avatar
🧐
Learning something new

Mauro Quinteros mauroquinteros

🧐
Learning something new
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.38177490234375</real>
@mauroquinteros
mauroquinteros / .eslintignore
Created November 24, 2022 03:56
Eslint and Prettier
dist
@mauroquinteros
mauroquinteros / readable.js
Created July 14, 2022 17:11
Read values from console input in Node
const readline = require("readline");
const { Readable } = require("stream");
const readableStream = new Readable();
readableStream.push("3 abb aab ababa");
readableStream.push(null);
const input = readline.createInterface({
input: readableStream,
output: process.stdout,
from typing import Callable, Coroutine, List
import aiohttp
import asyncio
async def http_get(session: aiohttp.ClientSession, url: str) -> Coroutine:
"""Execute an GET http call async """
async with session.get(url) as response:
resp = await response.json()
return resp
@mauroquinteros
mauroquinteros / app.js
Created March 11, 2022 14:44
Group objects by key
import { data } from "./data.js";
const serializeChannel = (channel) => ({
id: channel.SK,
channel: channel.nameChannel,
});
function getUniqueArrayByKey(dataList, key = "SK") {
const arrayMap = dataList.map((data) => [data[key], serializeChannel(data)]);
const uniqueMap = new Map(arrayMap);
@mauroquinteros
mauroquinteros / bill.js
Last active November 11, 2021 15:21
Generar Comprobantes
const axios = require("axios");
const URL = "http://flaskapi-env.eba-wnb42kap.us-east-1.elasticbeanstalk.com";
const HEADERS = {
Authorization: "Bearer c3f40934-a078-44a8-b6c7-f9a37fd721a7",
"Content-Type": "application/json",
};
function sliceIntoChunks(arr, chunkSize) {
@mauroquinteros
mauroquinteros / odoo.conf
Last active March 16, 2021 04:49
odoo.conf for mac os
[options]
# odoo.conf
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@mauroquinteros
mauroquinteros / styled-components.js
Created October 19, 2020 21:41
Styled Component with tagged template
function component(strings, ...values) {
return function (props) {
let newContent = strings.slice();
values.forEach((value, index) => {
newContent[index] += props[value];
});
return newContent.join("");
};
}