Skip to content

Instantly share code, notes, and snippets.

View pedroduartecosta's full-sized avatar
🏠
Working from home

Pedro Costa pedroduartecosta

🏠
Working from home
View GitHub Profile

Database

  • Use encryption for data identifying users and sensitive data like access tokens, email addresses or billing details.

  • If your database supports low cost encryption at rest (like AWS Aurora), then enable that to secure data on disk. Make sure all backups are stored encrypted as well.

  • Use minimal privilege for the database access user account. Don’t use the database root account.

  • Store and distribute secrets using a key store designed for the purpose. Don’t hard code in your applications.

Checklist

  • Implement user management.

  • Implement support for mobile devices.

  • Implement an information search system using the full-text search features of PostgreSQL.

  • Implementing online assistance (e.g. help online) in the product.

2.
1 2 3 4 5
TA,TB,TC,TD,TE
a.
1 tarefa -> 5min
i) 10 01 11 10 11
ii) 11 11 11 10 11
iii) 01 01 01 10 10

Data Connection Protocol

We used a script "port.sh" that can virtual emulate a connection through a serial port, you can execute that script by running:

sh port.sh

It's recomended to install socat to use this script.

tensorflow for poets:
https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/
Virtual Box -> Network -> port forward -> 6006 - 6006 and 8888 - 8888
docker run -it -p 6006:6006 -p 8888:8888 -v $HOME/tf_files:/tf_files gcr.io/tensorflow/tensorflow:latest-devel
python /tensorflow/tensorflow/models/image/imagenet/classify_image.py
@pedroduartecosta
pedroduartecosta / bestpractices.md
Last active March 31, 2018 14:24
Project Development Best Practices
  • Implement CI/CD pipelines
    • Gitlab CI
      • Use Runners
    • Github
      • Use TravisCI or others
    • Necessary stages
      • Build Code
      • Run Tests
        • Code quality
  • Unit testing
# Sprint1
#### Start-date: 30/03/18
#### End-date: 06/04/18
# Development Team
- Duarte Brandão
- Pedro Costa
- ...

How to set up a NodeJS website with Authentication and Back office (and Blog)

In this tutorial we're going to build a NodeJS website with the following features:

  • User authentication
  • Back office
  • Blog (optional)

The first to parts of the tutorial are meant to quickly set you up and running. The third part is a more in depth explanation of some points I find important, so feel free to read them later as you need.

Workshop instructions

  • Go to dynamo db

    • Create dynamoDB table
      • Table Name: posts
      • Primary key: id
      • Click create
  • Go to S3

  • Create s3 bucket

val conf = new SparkConf().setAppName("predictor")
val sc = new SparkContext(conf)
val sqlContext = new SQLContext(sc)
val rawData = sqlContext.read.format("com.databricks.spark.csv")
.option("header", "true")
.option("inferSchema", "true")
.load(dataPath)
.withColumn("DelayOutputVar", col("ArrDelay").cast("double"))
.withColumn("DepDelayDouble", col("DepDelay").cast("double"))