Skip to content

Instantly share code, notes, and snippets.

View jreyes's full-sized avatar

Johann Reyes jreyes

  • Vaporware Corp
  • Miami, Fl
View GitHub Profile
@jreyes
jreyes / README.md
Created March 19, 2024 19:44 — forked from sualeh/README.md
Create Nice-looking Schema Diagrams in PlantUML

Create Nice-looking Schema Diagrams in PlantUML

PlantUML is a descriptive language to generate a number of types of software diagrams, such as sequence, class, deployment and state diagrams, and many others. PlantUML does not generate very good-looking schema diagrams out of the box, but it supports themes and preprocessed macros. If you use themes and macros, you can not only use a simplified syntax, but also generate beautiful diagrams.

Here is an example of a PlantUML schema diagram, and we will build up the code to generate it.

Schema diagram

To start, describe your schemas, tables and columns using this syntax as an example.

/**
* Update the entries for a specific marker
* @param markerId Marker document ID
* @param entry Entry to be added to the marker
*/
updateEntriesForMarker(userKey: string, inmueble: any) {
return this.angularFirestore
.collection('users')
.doc(userKey)
.collection('inmuebles')
import com.panamahitek.ArduinoException;
import com.panamahitek.PanamaHitek_Arduino;
import com.panamahitek.PanamaHitek_MultiMessage;
import jssc.SerialPortException;
import javax.swing.*;
import java.awt.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@jreyes
jreyes / mariadb.sh
Last active April 14, 2019 23:28
Instalar MariaDB en Ubuntu 18.04
sudo apt-get update -y && sudo apt-get install mariadb-server
sudo mysql -u root -p
use mysql;
update user set plugin='' where User='root';
flush privileges;
exit
sudo /etc/init.d/mysql restart
@jreyes
jreyes / node.sh
Created May 20, 2018 08:07
Instalar Node.js 10 en Ubuntu 18.04
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs
node -v
npm -v
@jreyes
jreyes / java8.sh
Last active May 16, 2018 05:20
Instalar Oracle Java 8 en Ubuntu 17.10
sudo add-apt-repository ppa:webupd8team/java
sudo apt update && sudo apt install oracle-java8-installer
sudo apt install oracle-java8-set-default
javac -version
@jreyes
jreyes / index.html
Created April 21, 2018 16:58
Documento sin título // source https://jsbin.com/murafifife
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
</head>
<body>
<p><img src="http://media.comicbook.com/2018/03/vegeta4-1092189.jpeg"></p>
public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
Pattern.compile("(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])", Pattern.CASE_INSENSITIVE);
public static boolean validate(String emailStr) {
return VALID_EMAIL_ADDRESS_REGEX .matcher(emailStr).find();
}
@jreyes
jreyes / gstreamer-build.sh
Created June 26, 2017 11:45 — forked from sphaero/gstreamer-build.sh
Install & build gstreamer from git
#!/bin/bash --debugger
set -e
BRANCH="master"
if grep -q BCM2708 /proc/cpuinfo; then
echo "RPI BUILD!"
RPI="1"
fi
[ -n "$1" ] && BRANCH=$1
@jreyes
jreyes / SomeActivity.java
Created April 13, 2016 03:31
Strict development
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectAll()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedSqlLiteObjects()
.detectLeakedClosableObjects()