Skip to content

Instantly share code, notes, and snippets.

@c3ph3us
c3ph3us / vscode_cheat_sheet.md
Created August 17, 2023 15:45 — forked from RichardBronosky/vscode_cheat_sheet.md
Visual Studio code - VSCode Cheat Sheet - Keyboard Shortcuts

VSCode Cheat Sheet

Keyboard Shortcuts

Jump to closing bracket

Cmd+Shift+\

Though I suggest changing it as follows:

editor.action.jumpToBracket Ctrl+]

@c3ph3us
c3ph3us / approve_pr
Created August 17, 2023 15:45 — forked from RichardBronosky/approve_pr
This is a WIP. Use at your own risk.
#!/bin/bash
usage(){
echo -e "\n""${FUNCNAME[1]} <github_pull_url> <oauth_token>""\n"
return 1
}
_prepare_vars(){
local IFS=$'\n'
regex=''
# to add these aliases, copy-pasta the following line (without the #):
# curl -L https://gist.githubusercontent.com/RichardBronosky/eb1cc18c8c23020face1fe1926d27978/raw/setup.sh | bash
[push]
# See: https://stackoverflow.com/a/23918418/117471
default = current
# Use SSH instead of HTTPS for github.com
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
@c3ph3us
c3ph3us / redir_test.sh
Created August 17, 2023 15:39 — forked from RichardBronosky/redir_test.sh
A oneliner for testing redirects
#!/bin/bash
# The following line defines a bash function and is designed to be copy-pasta-ed into your terminal and used as shown on the last line of this file. I'm only putting it in a script to get it on gist
redir_test(){ curl -svLo /tmp/redir_test.out "$@" 2>&1 | grep -E '^(> Host|> GET|< HTTP|< location|[<>]\s*$)'; }
# BONUS: One super-useful use of this is to test your readiness to respond to future DNS changes. That can be done like so:
# redir_test -H 'Host: www.example.com' https://192.168.0.101/
# This assumes that your server at 192.168.0.101 is set up to serve www.example.com and this simulates what `curl https://www.example.com/` would do if DNS returned 192.168.0.101 when doing a lookup on www.example.com
redir_test "$@"

Assume-Role

AWS Assume-Role requiring only aws-cli and jq

Installation

Basic

git clone https://gist.github.com/80306011bb5da80c765ffd6aa2ecf89b.git arole
@c3ph3us
c3ph3us / README.md
Created August 17, 2023 15:34 — forked from RichardBronosky/README.md
A bash plugin to make files executable

bash-plusx

A bash plugin to make files executable

Installation

Set up bash_plugins folder

(Skip this step if you already have a bash_plugins folder.)

{
# simply copy-pasta this whole block, or customize these vars and copy-pasta the rest
@c3ph3us
c3ph3us / README.md
Created August 17, 2023 15:34 — forked from RichardBronosky/README.md
A bash plugin to make cd better

bash-cdl

A bash plugin to make cd better

Installation

Set up bash_plugins folder

(Skip this step if you already have a bash_plugins folder.)

{
# simply copy-pasta this whole block, or customize these vars and copy-pasta the rest
@c3ph3us
c3ph3us / README.md
Created August 17, 2023 15:33 — forked from RichardBronosky/README.md
A bash plugin to manage plugins

bash-bashplug

A bash plugin to manage plugins

Installation

Set up bash_plugins folder

(Skip this step if you already have a bash_plugins folder.)

{
# simply copy-pasta this whole block, or customize these vars and copy-pasta the rest
@c3ph3us
c3ph3us / tmux-panes.sh
Created August 17, 2023 15:10 — forked from RichardBronosky/tmux-panes.sh
A combination of the tmux commands: list-sessions list-windows and list-panes
#! /usr/bin/env bash
hi_color=$(tput setaf 4) #blue
bold=$(tput bold)
underline=$(tput smul)
normal=$(tput sgr0)
read -r -d '' usage << DOC
Prints out a table of tmux sessons, windows, and panels.
@c3ph3us
c3ph3us / install_latest_tmux.sh
Created August 17, 2023 15:09 — forked from RichardBronosky/install_latest_tmux.sh
TMUX added command prompt tab completion menus v3.2!
# SEE: https://github.com/tmux/tmux/blob/47923bd5f62f49924e20f3cabcff9350968449a2/CHANGES#L320-L323
# FROM: https://github.com/tmux/tmux#from-version-control
tmux -V
cd ~/src/
git clone https://github.com/tmux/tmux
cd tmux/
sudo apt install bison make pkg-config autotools-dev automake libevent-dev libncurses-dev
sh autogen.sh