Skip to content

Instantly share code, notes, and snippets.

View eliasleyton's full-sized avatar
🧢

Elías Leyton eliasleyton

🧢
  • Valparaiso, Chile
View GitHub Profile
@eliasleyton
eliasleyton / dim_time.sql
Last active March 6, 2019 17:05
dim_time for postgres
DROP TABLE dim_date;
CREATE TABLE dim_date(
date TIMESTAMP PRIMARY KEY
, day_part VARCHAR NOT NULL
, day_name VARCHAR(10) NOT NULL
, month_name VARCHAR(10) NOT NULL
, day_of_week SMALLINT NOT NULL
, week SMALLINT NOT NULL
, day SMALLINT NOT NULL
@eliasleyton
eliasleyton / id_rsa_encryption.md
Created November 5, 2018 02:04
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key

# unique project identifier (required)
sonar.projectKey=${JOB_NAME}
# project metadata (used to be required, optional since SonarQube 6.1)
sonar.projectName=${JOB_NAME}
sonar.projectVersion=${JOB_NAME}_1.0.${BUILD_NUMBER}
# path to source directories (required)
sonar.sources=src
# path to test source directories (optional)