Skip to content

Instantly share code, notes, and snippets.

😆

Igor C. de Paula IgorDePaula

😆
Block or report user

Report or block IgorDePaula

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Tray.js
import { app, BrowserWindow, nativeTheme, Menu, Tray, nativeImage } from 'electron'
const path = require('path')
let tray = null
try {
if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) {
require('fs').unlinkSync(require('path').join(app.getPath('userData'), 'DevTools Extensions'))
}
} catch (_) { }
View creditcard.js
{"status":
{"cvc": "incomplete", "expiry": "incomplete", "number": "incomplete"},
"valid": false,
"values":
{"cvc": "", "expiry": "", "number": "5234", "type": "master-card"}
}
@IgorDePaula
IgorDePaula / README.md
Created Jan 21, 2020 — forked from curran/README.md
The Iris Dataset
View README.md

This is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.

The HTML page provides the basic code required to load the data and display it on the page (as JSON) using D3.js.

View CalculeDistance.js
function deg2rad(deg) {
return deg * (Math.PI / 180);
}
module.exports = function getDistanceFromLatLonInKm(
centerCoordinates,
pointCoordinates
) {
const radius = 6371;
View makefile
#!/usr/bin/make
include .env
export
.PHONY: help
.DEFAULT_GOAL := help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
View read-csv.js
const request = require('request'),
fs = require('fs'),
path = require('path'),
pathRead = 'http://www.inmetro.gov.br/da/registro/LAMPADAS_LED_COM_DISPOSITIVO_INTEGRADO_A_BASE.csv',
pathWrite = 'LAMPADAS_LED_COM_DISPOSITIVO_INTEGRADO_A_BASE.csv'
const downloadCsv = async (pathRead, pathWrite) => {
await request(pathRead).on('end', (err, data) => {
console.log('=> Download concluído')
View pre-push
#!/bin/bash
if [ `git rev-parse --abbrev-ref HEAD` == "master" ]; then
sh build-frontend.sh
elif [ `git rev-parse --abbrev-ref HEAD` == "homologacao" ]; then
sh makeFrontend.sh
fi
@IgorDePaula
IgorDePaula / teste.html
Last active Dec 3, 2019
reconhecendo ponto no browser por upload
View teste.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button id="camera">camera</button>
<button id="screenshot">screenshot</button>
<input type="file" id="file">
@IgorDePaula
IgorDePaula / client.js
Created Nov 1, 2019 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
View client.js
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@IgorDePaula
IgorDePaula / shared.html
Last active Nov 25, 2019
pega compartilhado da area de trabalho, joga no video, renderiza no canvas e grava como webm
View shared.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
#canvas{
border:1px solid red;
}
</style>
You can’t perform that action at this time.