Skip to content

Instantly share code, notes, and snippets.

@MrDavidChz
MrDavidChz / installing-postman.md
Created April 5, 2021 14:52 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
[options]
#
# 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
@MrDavidChz
MrDavidChz / docker-compose.yml
Created December 29, 2020 16:42 — forked from byk0t/docker-compose.yml
Docker compose for odoo:14 and PostgreSQL:13
version: '3'
services:
db:
image: postgres:13
volumes:
- db-data:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432/tcp
environment:
- POSTGRES_PASSWORD=odoo
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@MrDavidChz
MrDavidChz / sequelizeBulkInsert.js
Created November 1, 2019 17:42 — forked from evansiroky/sequelizeBulkInsert.js
Insert CSV using sequelize bulk insert
var fs = require('fs'),
async = require('async'),
csv = require('csv');
var input = fs.createReadStream(filename);
var parser = csv.parse({
columns: true,
relax: true
});
@MrDavidChz
MrDavidChz / NumeroALetras.js
Created August 19, 2019 16:21 — forked from alfchee/NumeroALetras.js
Código en JavaScript que convierte números a letras, bastante útil para formularios de documentos contables y similares
/*************************************************************/
// NumeroALetras
// The MIT License (MIT)
//
// Copyright (c) 2015 Luis Alfredo Chee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@MrDavidChz
MrDavidChz / gist:c8351907630f862db7613c39afcd14d3
Created August 2, 2019 22:54 — forked from jnaskali/gist:2000102
PHP: Send XML over POST with cURL and save response
function sendXmlOverPost($url, $xml) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// For xml, change the content-type.
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
@MrDavidChz
MrDavidChz / parse-jwt.js
Created June 19, 2019 17:54 — forked from Klerith/parse-jwt.js
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
@MrDavidChz
MrDavidChz / forge.sh
Created June 5, 2019 20:20
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
@MrDavidChz
MrDavidChz / resourceControllers
Created February 19, 2018 18:07 — forked from d21anthony/resourceControllers
Resource Controllers : Laravel
*****************************************
*HTTP VERB | ACTION *
*****************************************
* GET | READ *
*****************************************
* POST | CREATE *
*****************************************
* PUT | UPDATE *
*****************************************
* DELETE | DELETE *