Skip to content

Instantly share code, notes, and snippets.

View dario61081's full-sized avatar
🎯
Focusing

Dario Garcia dario61081

🎯
Focusing
View GitHub Profile
@styblope
styblope / docker-api-port.md
Last active April 12, 2024 17:46
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@alphamu
alphamu / Android Privacy Policy Template
Created February 9, 2017 03:17
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@efrenfuentes
efrenfuentes / numero_letras.py
Created September 26, 2012 02:29
Numero a letras (Python)
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'efrenfuentes'
MONEDA_SINGULAR = 'bolivar'
MONEDA_PLURAL = 'bolivares'
CENTIMOS_SINGULAR = 'centimo'
@dario61081
dario61081 / console_1.sql
Created August 9, 2022 17:45
listar dinamicamente fecha usando recursividad en mysql
with recursive
p as (
select cast(:fecha_desde as date) fecha_desde ,
cast(:fecha_hasta as date) fecha_hasta
),
fechas as (
select cast(p.fecha_desde as date) fecha
from p
union
select date_add(f.fecha, interval 1 day)
<?php
include_once implode(DIRECTORY_SEPARATOR, [__DIR__, 'conector.inc.php']);
const debug=true;
$format=$_GET['format']??'json';
if (debug){
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
@dario61081
dario61081 / conexion.py
Created April 20, 2019 00:15
Clase para conexion con base de datos OpenSource MIT
#!/usr/bin/python
# Libreria de conexion a base de datos
# Autor: Dario R. Garcia G. DR2GSistemas
# Villeta - Paraguay
#
# Version: 1.02
# - Agregado runtime exception
# Version: 1.01
# - Bug fix: control de host y port
# Version: 1.00
@dario61081
dario61081 / select_in_list.sql
Created July 29, 2018 21:06
Seleccionando items de una tabla contra una lista subselect. (firebird)
-- seleccionando items de una tabla contra una lista subselect (firebird).
select p.categoria, t.sub_categoria,0 monto
from pagos p, (select distinct pp.sub_categoria from pagos pp) t
group by 1,2
-- dataset --
-- categoria: 7,8,9
-- sub categoria: a,b,c,d,e