Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
De volta as origens, com o canal Basicão da Eletrônica

Carlos Delfino carlosdelfino

💭
De volta as origens, com o canal Basicão da Eletrônica
View GitHub Profile
@carlosdelfino
carlosdelfino / gist:e5c90332100682b54b917591d352c14b
Created February 7, 2019 20:51
Arduinisk, buscando uma solução para comunicar com a porta Serial, recurso chamado SMDI, busco recurso que possa usar para envio e recebimento de dados pela porta serial, sem que seja pelo System() ou TrySystem().
[arduinisk]
exten => s,1,NoOp
exten => s,2,Set(regx="([a-zA-Z0-9]+)")
exten => s,3,Set(CCIDNAME=$["${CALLERIDNAME}": ${regx}])
exten => s,4,Set(regx="([0-9]+)")
exten => s,5,Set(CCIDNUM=$["${CALLERIDNUM}": ${regx}])
exten => s,6,ComunicaSerial("${DATETIME}, ${CCIDNAME},${CCIDNUM}")
[arduinisk]
exten => s,1,NoOp
exten => s,2,Set(regx="([a-zA-Z0-9]+)")
exten => s,3,Set(CCIDNAME=$["${CALLERIDNAME}": ${regx}])
exten => s,4,Set(regx="([0-9]+)")
exten => s,5,Set(CCIDNUM=$["${CALLERIDNUM}": ${regx}])
exten => s,6,ComunicaSerial("${DATETIME}, ${CCIDNAME},${CCIDNUM}")
// Vibration meter
// v1.0, June 2014
// GrMis - RCGROUPS
// Mais Informações visite: http://forum.arduino.cc/index.php?topic=225776.0 ou https://www.rcgroups.com/forums/showthread.php?2197784-DIY-vibration-meter-for-propeller-or-motor-balancing-%28etc-%29-Arduino-MMA7361
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h> // F Malpartida's NewLiquidCrystal library
#define I2C_ADDR 0x20 // I2C for PCF8574A inside the MJKDZ
{
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
"linterOptions": {
"exclude": ["node_modules/**/*.ts"]
},
"rules": {
"interface-over-type-literal": false,
"jsx-boolean-value": [true, "never"],
"jsx-no-lambda": false,
"no-console": false,
### Keybase proof
I hereby claim:
* I am carlosdelfino on github.
* I am carlosdelfino (https://keybase.io/carlosdelfino) on keybase.
* I have a public key whose fingerprint is 4504 30C3 504C AF58 ABB4 4238 153A 1E26 C8DB A2D4
To claim this, I am signing this object:
@carlosdelfino
carlosdelfino / watch config-manager.js
Last active August 6, 2018 20:17
Um sistema que permite manter as propriedades atualizadas conforme alterações de registros no banco de dados
const BaseManager = require('./base-manager');
const Config = require('../models/config');
let count = 0;
function checkProp(key) {
return typeof key === 'symbol' ||
(typeof key === 'object' && Object.prototype.toString.call(key) === '[object Symbol]') || ['model', 'isNew', 'errors'].indexOf(key.toString()) > -1 ||
!isNaN(key) ||
/^\$/.test(key) ||
@carlosdelfino
carlosdelfino / housing.ipynb
Last active August 2, 2018 21:30
handson-ml-scikit-tensorflow/housing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlosdelfino
carlosdelfino / after_res_hooks.js
Created July 24, 2018 04:36 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@carlosdelfino
carlosdelfino / DisplayVideoOverlay.js
Last active July 7, 2018 20:45
Display Video Overlay Proposal
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import { mergeAndSortChildren } from '../utils/others';
import 'video-react/dist/video-react.css';
import "../styles/display-video-overlay.css"
const propTypes = {
@carlosdelfino
carlosdelfino / Point.ts
Last active March 10, 2018 17:26
What is the best way to do a FIFO for Nativescript UI Chart
class Point {
value: number;
idx: number;
}