Skip to content

Instantly share code, notes, and snippets.

$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
$ sudo mkdir /opt/environments && cd /opt/environments
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate
(pgadmin4) $ pip install pgadmin4
...
(pgadmin4) $ pgadmin4 (setup credentials)
@cpjeanpaul
cpjeanpaul / StarUml-V3.md
Created April 15, 2020 19:17 — forked from danteay/StarUml-V3.md
Active StarUml 3 license
@cpjeanpaul
cpjeanpaul / import.php
Last active July 18, 2024 22:12
Procesar padrón reducido de SUNAT para importarlo a una tabla de postgres usando COPY
<?php
// iconv -f iso-8859-1 -t utf-8 padron_reducido_ruc.txt > utf8_padron_reducido_ruc.txt
echo "Limpiar caracteres especiales\n";
$data = file_get_contents('utf8_padron_reducido_ruc.txt');
$data = str_replace(array('\'', '"', '-'), '', $data);
file_put_contents('utf8_padron_reducido_ruc.txt', $data);
echo "Limpiar caracteres especiales: LISTO\n";
@cpjeanpaul
cpjeanpaul / clear.sql
Last active May 20, 2019 22:18
Clear catalog/category tables (Magento2)
##########################################################
# PRODUCTS
##########################################################
DELETE FROM `catalog_product_bundle_option`;
DELETE FROM `catalog_product_bundle_option_value`;
DELETE FROM `catalog_product_bundle_selection`;
DELETE FROM `catalog_product_entity_datetime`;
DELETE FROM `catalog_product_entity_decimal`;
DELETE FROM `catalog_product_entity_gallery`;
DELETE FROM `catalog_product_entity_int`;
<VirtualHost *:80>
DocumentRoot /var/www/sbs.jp/public_html
ServerName sbs.jp
<Directory /var/www/sbs.jp/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "${APACHE_LOG_DIR}/error.log"
<VirtualHost *:80>
ServerName fdm.jp
ServerAlias www.fdm.jp
DocumentRoot /var/www/fdm.jp/public_html
<Directory /var/www/fdm.jp/public_html>
Require all granted
AllowOverride all
</Directory>
@cpjeanpaul
cpjeanpaul / install.md
Created October 4, 2018 02:33 — forked from yugaego/install.md
Mac OS 10.13 High Sierra Install PHP 7.0 Apache MariaDB With Homebrew
{
"info": {
"_postman_id": "dcd1417c-20c8-3e2b-ca1e-befebd355f4b",
"name": "Magento Mifarma v1.1",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Login de cliente",
"event": [
{
"id":2655,
"sku":"1513819864-283",
"name":"Preservativo Control Touch & Feel 12Unidades",
"attribute_set_id":4,
"price":10,
"status":1,
"visibility":4,
"type_id":"simple",
"created_at":"2018-01-30 23:05:15",
<?php
session_start();
require_once "config.php";
require_once LIB . DIRECTORY_SEPARATOR . "fffff.php";
require_once MOD . DIRECTORY_SEPARATOR . "sag_venta.php";
require_once CPD . DIRECTORY_SEPARATOR . "tcpdf.php";
require_once CPD . DIRECTORY_SEPARATOR . "config/tcpdf_config.php";
require_once LIB . DIRECTORY_SEPARATOR . "numero_a_texto.php";