Skip to content

Instantly share code, notes, and snippets.

View paulopatto's full-sized avatar
🎯
Focusing

Paulo Patto paulopatto

🎯
Focusing
View GitHub Profile
@paulopatto
paulopatto / WinKeys.txt
Created November 8, 2023 00:04 — forked from letsgoawaydev/WinKeys.txt
Windows Product Keys
``````````````````````````````````````````
Windows Product Keys for Getting Past Setup
Windows XP - Windows 11
Home product keys are currently not added.
THESE WILL ONLY HELP YOU GET PAST SETUP AND WILL NOT
ACTIVATE WHEN YOU CONNECT TO THE INTERNET. THESE JUST
LET YOU INSTALL WINDOWS TO YOUR HARDDISK UNACTIVATED
``````````````````````````````````````````
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home/Core N 3KHY7-WNT83-DGQKR-F7HPR-844BM
Professional W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N MH37W-N47XK-V7XM9-C7227-GCQG9
Professional Enterprise
Professional Workstation
Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
@paulopatto
paulopatto / main.tf
Created April 14, 2021 18:09 — forked from danihodovic/main.tf
Terraform - static site using S3, Cloudfront and Route53
variable "aws_region" {
default = "eu-west-1"
}
variable "domain" {
default = "my_domain"
}
provider "aws" {
region = "${var.aws_region}"
@paulopatto
paulopatto / generate-ssh-key.sh
Created April 6, 2020 00:08 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@paulopatto
paulopatto / proxy.js
Last active November 28, 2023 16:14 — forked from nakedible-p/proxy.js
Script AWS ES proxy
var AWS = require('aws-sdk');
var http = require('http');
var httpProxy = require('http-proxy');
var express = require('express');
var bodyParser = require('body-parser');
var stream = require('stream');
if (process.argv.length != 3) {
console.error('usage: aws-es-proxy <my-cluster-endpoint>');
process.exit(1);
@paulopatto
paulopatto / Setup GCC and CLANG Toolchains.md
Created September 24, 2019 20:19 — forked from bhaskarvk/Setup GCC and CLANG Toolchains.md
Proper GCC (vers. 5/6/7) & LLVM/CLANG (vers. 4/5) Toolchain Setup on Ubuntu/Linux Mint

This approach uses update-alternatives to manage GCC and LLVM/CLANG C/C++ compiler toolchains. Although tested on Linux Mint 18.3, this approach should work on any Debian based distro or for that matter any Linux distro with update-alternatives support, provided the packages are installed correctly.

There are 3 files

  • gcc-alternatives.sh installs GCC versions 5/6/7 and sets up alternatives for gcc/g++/cpp/gfortran.
  • llvm-clang-alternatives.sh installs LLVM and CLANG versions 4/5 and sets up alternatives for various LLVM and CLANG programs including clang and clang++.
  • cc-alternatives.sh sets up alternatives for the cc, cxx, and the ld commands. This script can be used to change systemwide default compiler/linker combination to either GCC or CLANG.

Once these scripts are run you can change the system GCC/CLANG versions by running sudo update-alternatives --config gcc|clang. To change the default compiler/linker combo used by t

@paulopatto
paulopatto / docker-compose.yml
Created June 14, 2018 22:38 — forked from aizatto/docker-compose.yml
docker-compose.yml for MariaDB and Elasticsearch
# https://docs.docker.com/compose/overview/#variables-and-moving-a-composition-between-environments
version: '3'
services:
# https://hub.docker.com/_/mariadb/
database:
image: mariadb:10.3
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
@paulopatto
paulopatto / Algorithms.md
Last active April 2, 2018 04:31 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning
  • euclidean distance
  • pearson correlation coefficient
  • wighted mean
  • tanimoto coeficient
  • conditional probability
  • gini impurity
  • entropy
  • gaussian function
  • variance
  • dot products
@paulopatto
paulopatto / rubocop_pre_commit_hook
Last active April 19, 2017 07:49 — forked from mpeteuil/rubocop_pre_commit_hook
Ruby style guide git pre-commit hook using Rubocop as the style guide checker. Only runs on staged ruby files that have been added and/or modified.
#!/usr/bin/env ruby
# http://ruby-doc.org/stdlib-2.0.0/libdoc/English/rdoc/English.html
require 'English'
require 'rubocop'
ADDED_OR_MODIFIED = /^\s*(A|AM|M)\s*/
GIT_COMMAND = "git status --porcelain".freeze
modified_files = `#{GIT_COMMAND}`.split(/\n/)
@paulopatto
paulopatto / .tmux.conf.old
Last active August 29, 2015 14:03 — forked from trcarden/gist:3295935
dotfiles
# $Id: screen-keys.conf,v 1.5 2009/10/25 21:58:05 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the