Skip to content

Instantly share code, notes, and snippets.

View Rovel's full-sized avatar
🙈
Monkey patching life

Filipe Veloso Rovel

🙈
Monkey patching life
View GitHub Profile
@Rovel
Rovel / angular.md
Created October 30, 2015 20:11 — forked from asciant/angular.md
Angular Rails 4.2

Rails 4.2 environment with AngularJS and Foundation 5

New rails project
rails new my_app -T -d postgresql
Update the Gemfile

Add:

@Rovel
Rovel / Material Design Template.markdown
Created July 13, 2016 03:20
Material Design Template
docker rmi `docker images | awk '{ print $3; }'`
@Rovel
Rovel / Kali 2017.1 x64, Docker-ce Install script
Created January 24, 2018 18:22 — forked from nikallass/Kali 2017.1 x64, Docker-ce Install script
Kali 2017.1 x64, Docker-ce Install script
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert
@Rovel
Rovel / openssl-cert-convert.MD
Created December 12, 2018 20:09
Commands to convert open ssl files

OpenSSL origina at: https://code.google.com/archive/p/apns-sharp/wikis/HowToCreatePKCS12Certificate.wiki Here is how to create a PKCS12 format file using open ssl, you will need your developer private key (which can be exported from the keychain) and the CertificateSigningRequest??.certSigningRequest

  • Convert apn_developer_identity.cer (der format) to pem:

openssl x509 -in apn_developer_identity.cer -inform DER -out apn_developer_identity.pem -outform PEM

  • Next, Convert p12 private key to pem (requires the input of a minimum 4 char password):
@Rovel
Rovel / listRdsSnaps.sh
Created May 19, 2020 19:54
AWS List RDS SnapShots and check if they are public
#!/bin/bash
REGIONS=$(aws ec2 describe-regions --output json | awk -F'"' '/"RegionName":/ { print $4 }')
for Region in $REGIONS
do
Snaps=$(aws rds describe-db-snapshots --output json --region ${Region} | awk -F'"' '/"DBSnapshotIdentifier":/ {print $4 }')
if [ -z "$Snaps" ]; then
echo "No snapshots found in $Region"
echo "======================================================="
else
@Rovel
Rovel / settings.json
Last active May 28, 2020 03:04
Windows Terminal Profile
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"profiles": [
{
name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
MIX_ENV: test
@Rovel
Rovel / Gemfile
Created June 25, 2020 01:53 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@Rovel
Rovel / postgres-cheatsheet.md
Created October 23, 2020 20:52 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)