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

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`/emailAddress=kevinadi@mongodb.com"
# 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`/emailAddress=kevinadi@mongodb.com"
# Sign the server cert
// 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
## GIT PROMPT DISPLAY
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✚"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[red]%} ⇡"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[014]%} ✭"
PROMPT='$FG[008][%*]%{$reset_color%} $FG[004]%~%{$reset_color%} $FG[006]$(git_current_branch)%{$reset_color%}$(git_prompt_status)
$FG[002]❯%{$reset_color%} '
@jbelmont
jbelmont / CURL-cheatsheet.md
Created February 11, 2017 12:24 — forked from Kartones/CURL-cheatsheet.md
CURL Cheatsheet
  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
  • JSON PUT