Skip to content

Instantly share code, notes, and snippets.

View FDSoftware's full-sized avatar
🕶️
deployer mal

Diego FDSoftware

🕶️
deployer mal
View GitHub Profile
@FDSoftware
FDSoftware / test.php
Created February 16, 2019 19:49
borrrador para nuevo repo
include("./FDS_AFIP.php");
$datos_OUT = array(
'IVA' => {cond_iva},
'cond_venta' => {condicion_venta_idcondicion_venta},
'CUIT' => {cuit},
'subtotal' => {subtotal},
'exento' => {exento},
'saldo' => {saldo}
@FDSoftware
FDSoftware / load.php
Created March 11, 2019 04:30
wea para cargar por include diferentes vistas de un archivo, para diseños con UI diferentes en movil-tablet-pc y no quieras complicarte la vida con poner todo en un solo html-css gigante
<?php
function load_view($movil, $tablet,$pc_master_race){
$tablet_browser = 0; $mobile_browser = 0; $body_class = 'desktop';
if (preg_match('/(tablet|ipad|playbook)|(android(?!.*(mobi|opera mini)))/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { $tablet_browser++; }
if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { $mobile_browser++; }
if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) { $mobile_browser++; }
@FDSoftware
FDSoftware / Logger.cs
Created March 13, 2019 03:16
Logger para C#
using System;
using System.IO;
namespace XXXX
{
class Logger {
public static string nombre = ""; //nombre del archivo de log
//logger para debug /control de errores
public static void Init(){
@FDSoftware
FDSoftware / example.html
Created March 17, 2019 04:17
merca para el polsaker
<head>
<link rel="manifest" href="./manifest.json">
<meta charset="utf-8">
<meta name="theme-color" content="#317EFB"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-TileColor" content="#2F3BA2">
.....
@FDSoftware
FDSoftware / testUSB.ino
Created April 15, 2019 01:50
Test USB para el stm32
#include <USBComposite.h>
USBCompositeSerial CompositeSerial;
void setup()
{
CompositeSerial.registerComponent();
USBComposite.begin();
delay(2000);
}
@FDSoftware
FDSoftware / eventos.php
Created July 6, 2019 22:48
Revisa dos grupos de horarios evaluando si se solapan o no
<?php
//SRC: https://board.phpbuilder.com/d/10342598-quotconvert-quothoursminutesquot-to-quottotal-minutesquot-and-backquot/2
function hoursToMinutes($hours) {
$minutes = 0;
if (strpos($hours, ':') !== false) {
// Split hours and minutes.
list($hours, $minutes) = explode(':', $hours);
}
return $hours * 60 + $minutes;
<?php
//SRC: https://board.phpbuilder.com/d/10342598-quotconvert-quothoursminutesquot-to-quottotal-minutesquot-and-backquot/2
function hoursToMinutes($hours) {
$minutes = 0;
if (strpos($hours, ':') !== false) {
// Split hours and minutes.
list($hours, $minutes) = explode(':', $hours);
}
return $hours * 60 + $minutes;
@FDSoftware
FDSoftware / Test_Punteros
Created September 25, 2019 19:41
test de punteros y punteros sobre punteros, confuso a mas no poder
#include <iostream>
using namespace std;
// udp es el ultimo digito del padron
int udp = 8;
int *f1 (int cant){
int *aux = new int[cant];
return aux;
}
<template>
<div class="Questions">
<v-card class="mx-auto mt-1 ml-5" max-width="400" outlined>
<v-card-subtitle>Preguntas de la comunidad :D</v-card-subtitle>
<v-divider></v-divider>
<v-list-item three-line>
<v-avatar size="64">
<img alt="Avatar" :src="preguntaActual.Foto" />
</v-avatar>
@FDSoftware
FDSoftware / repe.php
Last active December 17, 2019 21:50
Buscar repetidos en un array en php
<?php
$vars = array(
0 => 1234352,
1 => 1234351,
2 => 41,
3 => null,
4 => 1352,
5 => 0,
6 => 0,
);