Skip to content

Instantly share code, notes, and snippets.


Martín Cigorraga cig0

View GitHub Profile
cig0 /
Created Dec 31, 2021 — forked from andreyvit/
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
# bash generate random alphanumeric string
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
cig0 / comments-trick.json
Created Aug 12, 2021 — forked from MoOx/comments-trick.json
How to make comment in JSON file
View comments-trick.json
"//field": "These 'double quote' 'double quote' are used as comments, because JSON doesnt' allow comment",
"field": {},
"#another-field": "Another comment",
"another-field": {},
"/*stuff": "Be careful to use them when you have full control of the content :)",
"stuff": [],
"bla": "bla"
cig0 /
Created Aug 11, 2021
Braile spinner for shell scripts -- Taken from
# Copyright Notice:
# This spinner script has been taken from
spinners=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏)
View GitCommit.sublime-syntax
%YAML 1.2
# Highlight regular git commits, merge commits, and tags.
name: Git Commit
scope: text.git.commit
View dynamodbDemo.yml
AWSTemplateFormatVersion: 2010-09-09
Type: AWS::DynamoDB::Table
TableName: AuthorsTable_prod
- AttributeName: "AuthorName"
AttributeType: "S"
- AttributeName: "BookTitle"
cig0 / eks.bash
Last active Mar 26, 2021
AWS EKS eksctl: dirty Bash script - literally, it's a very much WIP - that I put together to quickly bring up / tear down an AWS EKS test/dev cluster when working on my Harness certification
View eks.bash
#!/usr/bin/env bash
# This script creates a small dev/test EKS cluster using Spot instances. It is very much a WIP, don't run it blindly!
# You can run ./eks.bash to get a list of the available actions; use ./eks.bash template.create to create a ClusterConfig config-file ready to spin up a new cluster
# Shout-outs to:
# @totallyGreg [ ]
# @Erikdeirdre [ ]
# For sharing their code which I took as a baseline to work with and from which I learned a few tricks
cig0 /
Created Dec 9, 2020 — forked from negz/
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
cig0 / pre-push
Created Sep 10, 2019 — forked from kalpeshsingh/pre-push
A pre-push git hook that notify Amazon Chime group
View pre-push
branch="$(git rev-parse --abbrev-ref HEAD)"
# get computer name to append in Chime message
# a branch name where you want to prevent git push. In this case, it's "master"
if [ "$branch" = "master" ]; then
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup
cig0 / VS Code Remore-Containers Extension Dockerfile
Last active Aug 4, 2019
Hacky but nice way to bypass COPY fail error
View VS Code Remore-Containers Extension Dockerfile
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See for license information.
FROM python:3
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive