Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 14, 2025 13:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bradp
bradp / setup.sh
Last active March 7, 2025 15:26
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
Cursor movement
h - move left
j - move down
k - move up
l - move right
w - jump by start of words (punctuation considered words)
W - jump by words (spaces separate words)
e - jump to end of words (punctuation considered words)
E - jump to end of words (no punctuation)
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active February 9, 2025 02:05
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@lkraider
lkraider / generator.py
Created April 4, 2016 17:17
Terraform AWS policy generator
#!/usr/bin/env python
"""Convert CSV policies into AWS JSON format."""
import json
import csv
POLICIES = 'terraform.csv'
CRUD_COL = 2
ACTION_COL = 3
@leonardofed
leonardofed / README.md
Last active March 14, 2025 18:19
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@enricofoltran
enricofoltran / main.go
Last active January 22, 2025 07:38
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@debuglevel
debuglevel / selfsigned-certificates_gitlab-ci.yml
Created July 20, 2018 10:20
Using a self signed certificate for docker repository in GitLab
image: docker:stable
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
# from https://gitlab.com/gitlab-org/gitlab-runner/issues/1350
services:
- name: docker:dind
command:
@bric3
bric3 / SSLPoke.java
Created February 10, 2020 07:17
The famous SSLPoke from Atlassian : establish a TLS connection but support http proxy and updated to Java 11
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;