Skip to content

Instantly share code, notes, and snippets.

View gsusrafael's full-sized avatar
🎯
Focusing

Jesus Rafael Sanchez gsusrafael

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gsusrafael on github.
  • I am gsusrafael (https://keybase.io/gsusrafael) on keybase.
  • I have a public key ASBWGsVP1WcfBhzakjcNokhlpGDPpSoxyZ4ZhJ84cMHI6Ao

To claim this, I am signing this object:

@gsusrafael
gsusrafael / AzulPaymentGateway.php
Last active January 20, 2020 04:30 — forked from lupena/AzulPaymentGateway.php
[Azul PHP BPD Sample] Class to handle Azul Payment Gateway Methods / Banco Popular Dominicano BPD / Azul.com.do #azul #paymentgw #php
/**
* PHP version 5
* @package AzulPaymentGateway
* @author ideologic SRL <touch@ideologic.do>
* @since File available since Release 1
*/
<?php namespace App;
// use Illuminate\Database\Eloquent\Model;
// use DB;
@gsusrafael
gsusrafael / instruction.rst
Last active January 20, 2020 04:31 — forked from iledarn/instruction.rst
[Docker replicated Odoo] Instructions about replicated odoo #documentation #odoo #docker

Here you may see about bi-directional replication we have used http://2ndquadrant.com/en/resources/bdr/

We use here 64bit ubuntu 14.04 with docker to demonstrate our replication solution. First we need to install docker .

sudo su
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
@gsusrafael
gsusrafael / gist:c163383ed0164fd8512b985ef01871f7
Last active January 20, 2020 04:31 — forked from davisford/gist:5039064
[Clone into non-empty directory] Git cloning into non-empty directory #git

Let's say you start a project locally, and do some editing.

$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILE

Now you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly:

@gsusrafael
gsusrafael / drop_database_with_connections.sql
Last active January 20, 2020 04:32
[Dropping mutiple PostgreSQL DB's] Dropping PostgreSQL databases with connections, you first disconnect the database and then drop it... #pgsql #sql #cleanup
do
$$
declare
v_database varchar(120);
begin
for v_database in values
('test'),('repuesto'),('neotec2'),('casla'),
('eldorado'),('ctcdemo'),('alcant'),('rep8ymedio'),
('rep8ymedio_replica'),('soporte'),('testpos'),
('consulta'),('inmobiliaria'),('kisiaris'),('kissiaris'),
@gsusrafael
gsusrafael / xml_parser.sh
Last active January 20, 2020 04:33 — forked from glejeune/xml_parser.sh
[Bourne-compatible shell XML parser] A simple XML parser for sh, zsh, bash, ... #bash #sh #zsh #xml
#!/bin/sh
# This script is a very naive XML parser for sh
# ...
# This fontion is called once for each file. It initialize the parser
#
# Type: private
# Parameters:
@gsusrafael
gsusrafael / odoo_9_clear_move
Last active January 20, 2020 04:34 — forked from eneldoserrata/odoo_9_clear_move
[Clearing Odoo 9 tables] Clearing the main Odoo tables and dependencies #odoo #sql #cleanup
/*
* odoo_clean_table.sql
* Copyright (C) 2016 Jesus R. Sanchez <jesusrafael@gmail.com>
*
* Distributed under terms of the BSD license.
*
*/
DO
$$