Skip to content

Instantly share code, notes, and snippets.

@matheussantana
matheussantana / save-load-docker-images.sh
Created February 7, 2019 19:58 — forked from YannRobert/save-load-docker-images.sh
Script to (selectively) save/load multiple Docker images
#!/usr/bin/env bash
# Script to (selectively) save/load multiple Docker images to/from a directory.
# Run ./save-load-docker-images.sh for help.
set -e
directory=$PWD
filter=""
compress=0
@matheussantana
matheussantana / The Technical Interview Cheat Sheet.md
Created March 8, 2018 16:41 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@matheussantana
matheussantana / OpenSSL Verify Signature in Bash
Created January 22, 2018 20:16 — forked from DustinD2/OpenSSL Verify Signature in Bash
This is a sample openssl bash script to create a matching RSA key pair and create a signed sha1 digest of the script itself using the private key. The digest is then verified against the public key.
#!/bin/bash
#create our key pairs
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout -out public.pem
#sign and verify
openssl dgst -sha1 -sign private.pem -out "$0".sha1 $0
openssl dgst -sha1 -verify public.pem -signature "$0".sha1 $0
@matheussantana
matheussantana / _README.md
Created December 5, 2017 21:44 — forked from schickling/_README.md
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).