Skip to content

Instantly share code, notes, and snippets.

View jbelmont's full-sized avatar
💭
Weekend Mode

Jean-Marcel Belmont jbelmont

💭
Weekend Mode
View GitHub Profile
@jbelmont
jbelmont / RH415.md
Created November 12, 2024 15:04 — forked from luckylittle/RH415.md
Red Hat RH415 Notes

Red Hat Security: Linux in Physical, Virtual and Cloud (RH415)

Last update: Mon Nov 18 05:32:46 UTC 2019 by @luckylittle


1. Managing Security & Risk

# USING YUM TO MANAGE SECURITY ERRATA:

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.

The original author seems to be Charles Edge, here's the original content, as pointed out by @percisely.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s

@jbelmont
jbelmont / YesNoIntents.adoc
Created March 12, 2021 00:27 — forked from habuma/YesNoIntents.adoc
Handling Yes/No Intents in an Alexa Skill

An Alexa skill may ask a user a Yes/No question and the response handled by request handlers for the built-in AMAZON.YesIntent and AMAZON.NoIntent intents. (This is different than dialog confirmation where Yes/No confirmation is handled by the dialog.)

It’s easy to setup these intents and their respective intent handlers. Just like any intent, declare them in the interaction model:

{
  "name": "AMAZON.YesIntent",
  "samples": []
},
{
@jbelmont
jbelmont / example.tf
Created October 8, 2020 21:23 — forked from chancez/example.tf
Support creating a DNS validated ACM certificate containing SANs for multiple different hosted zones
module "combined_acm_certificate" {
source = "../../modules/acm_certificate_dns_validated_multi_zone"
domain_name = "infra.example.com"
zone_to_san = {
"infra.example.com" = [
"*.infra.example.com",
"*.dev.infra.example.com",
"*.staging.infra.example.com",
"*.production.infra.example.com",
@jbelmont
jbelmont / mongodb-ssl.sh
Created September 1, 2020 21:52 — forked from kevinadi/mongodb-ssl.sh
Script to create self-signed CA certificates, server certificates, and client certificates for testing MongoDB with SSL
#!/bin/sh
# Generate self signed root CA cert
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]"
# Generate server cert to be signed
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]"
# Sign the server cert
@jbelmont
jbelmont / docker_commands_and_scenarios.md
Last active September 25, 2019 19:37
A list of command docker commands and scenarios.

Docker Commands cheat sheet list

Listing Images that you have in your local machine

$ docker images
REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
sourcegraph/server               3.8.0               504e86fa7376        6 days ago          833MB
nosql-workshop_mongo-router      latest              809631f8d908        11 days ago         394MB
alpine                           3                   961769676411        5 weeks ago         5.58MB
@jbelmont
jbelmont / .bashrc
Created July 22, 2019 14:56
PS1 PROMPT
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\] git:(\$(git symbolic-ref HEAD 2> /dev/null | sed 's/refs\/heads\///g')) "
When executing interactively, bash displays the primary
prompt PS1 when it is ready to read a command, and the
secondary prompt PS2 when it needs more input to complete
a command. Bash allows these prompt strings to be cus­
tomized by inserting a number of backslash-escaped special
characters that are decoded as follows:
\a an ASCII bell character (07)
\d the date in "Weekday Month Date" format
// a list of useful queries for profiler analysis. Starting with the most basic.
// 2.4 compatible
//
// output explained:
//
{
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred
"op" : "query", // the operation type
"ns" : "game.players", // the db and collection
@jbelmont
jbelmont / workshop_setup_nosql
Created May 16, 2019 23:28
Workshop Setup for NoSQL Part II
So in the README.md I put instructions https://github.com/jbelmont/nosql-workshop/blob/master/README.md
Please make sure you have installed docker in your machine.
Then pull down mongo image with following command:
Install my mongo image:
docker pull jbelmont/nosql-mongo-image-with-scripts:v1