Skip to content

Instantly share code, notes, and snippets.

View vitorpacheco's full-sized avatar

Vitor Pacheco vitorpacheco

  • Solutis Tecnologias
  • Brasil, Salvador - BA
View GitHub Profile
@vitorpacheco
vitorpacheco / gist:733764
Created December 8, 2010 19:23
Gestão de Projetos

Gestão de Projetos

Projeto

Projeto é um esforço temporário empreendido para criar um produto, serviço ou resultado exclusivo.

Operações X Projetos:

class Main {
static void calc_err(float xb, float x) {
float erroAbsoluto = Math.abs(x - xb);
float erroRelativo = Math.abs(erroAbsoluto/xb);
System.out.printf("%.5f %.5f\n", erroAbsoluto, erroRelativo);
}
public static void main(String[] args) {
@vitorpacheco
vitorpacheco / ListAdapter.kt
Last active April 1, 2020 13:06
ListAdapter for RecyclerView
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.AsyncListDiffer
import androidx.recyclerview.widget.DiffUtil
#parse("File Header.java")
@vitorpacheco
vitorpacheco / show-indexes.js
Created February 4, 2019 13:57 — forked from ixti/show-indexes.js
Small script that extracts all non-default indexes from MongoDB
rs.slaveOk();
db.getCollectionNames().forEach(function(coll) {
db[coll].getIndexes().forEach(function(index) {
if ("_id_" !== index.name) {
print("db." + coll + ".createIndex(" + tojson(index.key) + ")");
}
});
});
@vitorpacheco
vitorpacheco / launch.json
Created August 8, 2017 19:01
Debug VSCode
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
#!/bin/bash
fuser 9443/tcp
fuser 9080/tcp
fuser 8878/tcp
fuser 8879/tcp
fuser 9060/tcp
kill -9 `ps -ef | grep java | awk -F" " '{print $2}'`
#!/bin/bash
WAS_HOME=/opt/IBM/WebSphere/AppServer/profiles/AppSrv01
EAR=$1
printf "[DEPLOY] --- Gerando versão"
printf "\n"
mvn -e clean package -DskipTests
printf "[DEPLOY] --- Copiando EAR..."
# vim:set ft=dockerfile:
# Create image based on the official Node 9.6.1 image from dockerhub
FROM php:7.2.2-fpm
# Install dependecies
RUN apt-get update && apt-get install -y \
zlib1g-dev \
libmemcached-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
@vitorpacheco
vitorpacheco / Dockerfile-backend
Created March 24, 2018 21:02
laravel-angular
# vim:set ft=dockerfile:
# Create image based on the official Node 9.6.1 image from dockerhub
FROM php:7.2.2-fpm
# Install dependecies
RUN apt-get update && apt-get install -y \
zlib1g-dev \
libmemcached-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
{
"resourceType": "Practitioner",
"id": "#8295",
"contained": [
{
"resourceType": "PractitionerRole",
"id": "1",
"active": true,
"period": {
"start": "2017-12-07T00:00:00-03:00"