Skip to content

Instantly share code, notes, and snippets.

View Yuri-M-Dias's full-sized avatar
🛰️
Off to space

Yuri Dias Yuri-M-Dias

🛰️
Off to space
  • Brazil
View GitHub Profile
@Yuri-M-Dias
Yuri-M-Dias / ssl-generation.sh
Last active January 28, 2017 08:55
Generating full SSL for Tomcat/Jetty using Java Keytool.
#!/bin/bash
# Generates a SSL certificate, java-ready with the hardcoded ips and name.
# Change varibale names to suit your need, you can do JAVA_HOME=$JAVA_HOME too.
JAVA_HOME=/usr/lib/jvm/java-8-oracle
CERT_NAME="yurimdias"
STOREPASS="changeit"
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
CERTIFICATE_PATH=./$(echo $CERT_NAME)
@Yuri-M-Dias
Yuri-M-Dias / provision.sh
Last active February 28, 2016 23:01
Protractor with cucumber provision
#!/usr/bin/env bash
echo "Provision VM START"
echo "=========================================="
#install nodejs
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
@Yuri-M-Dias
Yuri-M-Dias / setenv.sh
Last active July 16, 2021 08:10 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection, now with debug connection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@Yuri-M-Dias
Yuri-M-Dias / server.xml
Last active June 28, 2016 15:17
My local tomcat's server.xml, with SLL enabled on 8443.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
@Yuri-M-Dias
Yuri-M-Dias / installVimWithClipboard
Created July 15, 2016 18:56
Partial vim build command to install it with clipboard functions, and python 2.7 on Linux Mint.
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
--enable-perlinterp \
--enable-luainterp \
--enable-cscope \
--enable-fontset \
--enable-xim \
@Yuri-M-Dias
Yuri-M-Dias / DataMiningAlgorithms.py
Created March 9, 2017 12:57
An Nth nearest and Naive Bayes implementation in Python 3.
#!/usr/bin/env python
import math
import operator
from sklearn import datasets
from sklearn import svm
import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from sklearn.naive_bayes import GaussianNB
import matplotlib.pyplot as plt
@Yuri-M-Dias
Yuri-M-Dias / first.erl
Created June 22, 2017 02:48
FutureLearn - Erlang - 1.9
-module(first).
-export(
[
double/1,
mult/2,
area/3,
square/1,
treble/1
]
).
@Yuri-M-Dias
Yuri-M-Dias / keybase.md
Created June 29, 2017 18:40
keybase.md

Keybase proof

I hereby claim:

  • I am Yuri-M-Dias on github.
  • I am yurimdias (https://keybase.io/yurimdias) on keybase.
  • I have a public key whose fingerprint is 2F50 5F0A 0C4C CD99 A731 6C5F DE19 7A9D 3A09 177A

To claim this, I am signing this object:

@Yuri-M-Dias
Yuri-M-Dias / exe10.js
Last active October 8, 2017 15:48
Lista 6 - Exe 10
let operandos = "+-/*^";
let getPrioridade = (caracter) => {
if(caracter === "^") {
return 5;
}
if(caracter === "*" || caracter === "/") {
return 4;
}
if(caracter === "+" || caracter === "-") {
import matplotlib.pyplot as plt
from scipy.io import wavfile
from glob import glob
import cv2
import pandas as pd
import numpy as np
from os.path import basename
import gc
import h5py
import os