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
@IgorDePaula
IgorDePaula / composer.json
Created Mar 22, 2020 — forked from andyshinn/composer.json
Docker Compose PHP Composer Example
View composer.json
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
View post-receive
#!/bin/bash
TARGET="/var/www/html"
GIT_DIR="/home/ubuntu/crm.git"
BRANCH="master"
TARGET_HOMOLOGACAO="/home/ubuntu/homologacao"
BRANCH_HOMOLOGACAO="homologacao"
while read oldrev newrev ref
do
# only checking out the master (or whatever branch you would like to deploy)
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">
You can’t perform that action at this time.