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 / bom.csv
Last active September 21, 2021 19:37
Scanner BOM
Item Qty Reference(s) Value LibPart Footprint Datasheet LCSC
C1 100nF Device:C_Small Capacitor_SMD:C_0805_2012Metric ~ C49678
C2 100nF Device:C_Small Capacitor_SMD:C_0805_2012Metric ~ C49678
C3 20pF Device:C_Small Capacitor_SMD:C_0603_1608Metric ~ C56475
C4 20pF Device:C_Small Capacitor_SMD:C_0603_1608Metric ~ C56475
D1 1N4148WS Diode:1N4148WS Diode_SMD:D_SOD-323 https://www.vishay.com/docs/85751/1n4148ws.pdf C110221
D2 9.1v Device:D_Zener_Small_ALT Diode_SMD:D_SOD-123 ~ C438333
D3 1N4148WS Diode:1N4148WS Diode_SMD:D_SOD-323 https://www.vishay.com/docs/85751/1n4148ws.pdf C110221
J1 Conn_01x06 Connector_Generic:Conn_01x06 Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical ~
J2 Conn_01x03 Connector_Generic:Conn_01x03 Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical ~
import React, { Ref, useRef, useImperativeHandle, useCallback, useEffect, useState } from 'react'
import TextField, { TextFieldProps } from '@material-ui/core/TextField'
import { InputBaseComponentProps } from '@material-ui/core/InputBase'
import { EditorState } from 'draft-js'
import MUIRichTextEditor from '../../'
import { TMUIRichTextEditorRef } from '../../src/MUIRichTextEditor'
export const RichTextInput = ({
inputRef,
@FDSoftware
FDSoftware / testPagintacion.js
Created March 16, 2020 16:36
Pagina data para mostrarla en una tabla, nada mas ?)
let data = 51;
let dataPerPage = 3;
let actual = 0;
let desde = dataPerPage * actual;
let hasta = desde + dataPerPage;
const setPageInfo = () => {
desde = dataPerPage * actual;
@FDSoftware
FDSoftware / Falopa.ts
Created March 3, 2020 19:43
TypeScript y sus bugs falopa con functional component , en este caso props default y interface
/* eslint-disable jsx-a11y/alt-text */
import React from "react";
// Related issue https://github.com/microsoft/TypeScript/issues/36433
interface myProps {
imgData?: {
username: string,
title: string,
url: string
}
}
@FDSoftware
FDSoftware / index.js
Created February 23, 2020 19:44
Test de "simple-youtube-api"
const YouTube = require('simple-youtube-api');
const youtube = new YouTube('aca va el don token');
youtube
.getPlaylist(
'https://www.youtube.com/watch?v=tbayNy9Dg-g&list=RDomh3Pbb-e0k&index=2'
)
.then(playlist => {
console.log(`Titulo de la playlist: ${playlist.title}`);
playlist
var items = Array(523,3452,334,31,etc);
var test = items[items.length * Math.random() | 0];
console.log("numero random: " + test);
@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,
);
<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 / 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;
}
<?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;