Skip to content

Instantly share code, notes, and snippets.

View julianoBRL's full-sized avatar
🕹️
Loading...

Juliano Lira julianoBRL

🕹️
Loading...
View GitHub Profile
@julianoBRL
julianoBRL / RGBtoHSV.py
Created May 29, 2024 18:49
Converter from RGB to HSV
# Python programs to find
# unique HSV code for color
# Importing the libraries openCV & numpy
import cv2
import numpy as np
def RGBtoHSV(red,green,blue):
color = np.uint8([[[blue, green, red]]])
hsv_color = cv2.cvtColor(color, cv2.COLOR_BGR2HSV)
@julianoBRL
julianoBRL / ecosystem.config.js
Last active April 10, 2024 20:35
PM2 Ecosystem Autoscan
/*
Title: PM2 Ecosystem Autoscan
Author: Juliano Lira(Shintaro)
Date: 10/04/2024 17:30
*/
const fs = require('node:fs');
const path = require('node:path');
warning: In the September 2023 release, the default triplet for vcpkg libraries changed from x86-windows to the detected host triplet (x64-windows). For the old behavior, add --triplet x86-windows . To suppress this message, add --triplet x64-windows .
Computing installation plan...
The following packages will be built and installed:
freeimage:x64-windows@3.18.0#25
* imath:x64-windows@3.1.11
* jasper[core,default-features,opengl]:x64-windows@4.2.1
* jxrlib:x64-windows@2019.10.9#6
* lcms:x64-windows@2.14
* libdeflate[compression,core,decompression,gzip,zlib]:x64-windows@1.19#1
* libjpeg-turbo:x64-windows@3.0.2
function distancia(x1, y1, z1, x2, y2, z2)
return math.sqrt((x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2)
end
function objetoMaisProximo(lista, x, y, z)
local objetoMaisProximo = nil
local menorDistancia = math.huge
for _, objeto in pairs(lista) do
local d = distancia(x, y, z, objeto.x, objeto.y, objeto.z)
Configuration configuration = new Configuration()
.put("java.net.useSystemProxies", "true")
.put("http.proxyHost", "localhost")
.put("http.proxyPort", "8888")
.put("http.proxyUser", "1")
.put("http.proxyPassword", "1");
HttpClient nettyHttpClient = new NettyAsyncHttpClientBuilder()
.configuration(configuration)
.build();
@julianoBRL
julianoBRL / material.module.ts
Last active March 25, 2022 14:18
Angular material import
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
import {NgModule} from '@angular/core';
import {A11yModule} from '@angular/cdk/a11y';
import {ClipboardModule} from '@angular/cdk/clipboard';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {PortalModule} from '@angular/cdk/portal';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {CdkStepperModule} from '@angular/cdk/stepper';
import {CdkTableModule} from '@angular/cdk/table';
@GetMapping
@SuppressWarnings({ "deprecation" })
private ResponseEntity<StreamingResponseBody> get() throws IOException {
StreamingResponseBody responseBody = response -> {
response.write(("{\"Header\":\"data\",").getBytes());
otherClass(response);
response.write(("}").getBytes());
response.flush();
@julianoBRL
julianoBRL / Eniac-2022.c
Last active February 21, 2022 21:23
2022 - 1F - Fevereiro - Programação Estruturada
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct {
int codigo;
char *data;
char descricao[40];
} Registro;
[Unit]
Description=Admin service
After=syslog.target network.target
[Service]
WorkingDirectory=/home/ec2-user
ExecStart=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.amzn2.0.2.x86_64/bin/java -jar admin-server-0.0.1-SNAPSHOT.jar
ExecStop=/bin/kill -15 $MAINPID
[Install]
import java.sql.Types;
/*
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</dependency>
spring.jpa.database-platform=com.shintaro.sqlite.sqliteConfig.SQLiteDialect