Skip to content

Instantly share code, notes, and snippets.

View JasonGiedymin's full-sized avatar
🏠
Working from home

Jason Giedymin JasonGiedymin

🏠
Working from home
View GitHub Profile
@JasonGiedymin
JasonGiedymin / case_study.md
Last active March 5, 2024 07:21
Case Study

Case Study

A windows case study.

The details of what I would do for Linux would be different, but the premise would remain.

Table Of Contents

@JasonGiedymin
JasonGiedymin / azv
Last active October 11, 2023 19:38
Azure Vault CLI Helper script
#!/usr/bin/env zsh
# Script: azv
# Author: Jason Giedymin <[email protected]>
# Name: azv
# Version: 1.0.4
# Description: Azure Vault Helper Script
# License: MIT
#
# Exit Codes:
@JasonGiedymin
JasonGiedymin / gist:90f701e603ee9a93eef5c9ac748d1b24
Created July 20, 2022 17:26
Quick sorting of elasticsearch indices by size
# simple sort
curl --no-progress-meter --stderr - -X GET --user "<username>:<password>" "https://<host>:<port>/_cat/indices" | sort -g -k 7
# if you want do do some formatting in between or what have you
curl --no-progress-meter --stderr - -X GET --user "<username>:<password>" "https://<host>:<port>/_cat/indices" | tr -s '[:blank:]' ',' | sort -g --field-separator=',' -k 7 | column -t -s ','
@JasonGiedymin
JasonGiedymin / entrypoint
Last active May 27, 2022 16:14
Bash trap a nodejs application - useful for docker
#!/usr/bin/env bash
set -e
sig_handler() {
exit_status=$? # Eg 130 for SIGINT, 128 + (2 == SIGINT)
if [[ exit_status -gt 0 ]]; then
cat <<EOF
!!!
WARN: signal [$exit_status] recieved by entrypoint ... returning it"
@JasonGiedymin
JasonGiedymin / scroll-problem-iterm-zsh-tmux-powerline.md
Created June 14, 2018 02:25
Having problems with iterm + zsh + tmux + powerline, where it continues to scroll?

Problem:

Having problems with iterm + zsh + tmux + powerline, where it continues to scroll?

Solution:

Navigate to Preferences (top menu) -> Profiles (pane view) -> Text (tab view) -> uncheck "Use Unicode Version 9 Widths" (checkbox). More details at issue-1652.

@JasonGiedymin
JasonGiedymin / nginx.conf
Created September 8, 2017 19:52 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@JasonGiedymin
JasonGiedymin / DefaultKeyBinding.dict
Created August 2, 2017 16:40
If you use a standard pc keyboard layout for Mac and desire Home|End keys to function, create this file `~/Library/KeyBindings/DefaultKeyBinding.dict`
{
"\UF729" = "moveToBeginningOfLine:";
"\UF72B" = "moveToEndOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
}
@JasonGiedymin
JasonGiedymin / cherry-pick-sample.sh
Created May 28, 2017 03:10
Git cherry pick out files into another directory with full paths retained.
#!/usr/bin/env bash
#
# Author: _j_a_s_o_n_g_at_a_p_a_c_h_e_dot_org
# License: GNU GPLv3
#
set -e
if [ -z "$1" ]; then
echo "Please supply param 1 as the git hash which to cheery pick. Now exiting..."
@JasonGiedymin
JasonGiedymin / agnoster-newline.zsh-theme
Created January 24, 2017 06:59 — forked from nweddle/agnoster-newline.zsh-theme
Agnoster ZSH Theme with New Line
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline

Keybase proof

I hereby claim:

  • I am JasonGiedymin on github.
  • I am jasongiedymin (https://keybase.io/jasongiedymin) on keybase.
  • I have a public key whose fingerprint is 144B 2F97 1556 C9DB E25F 1DD0 DFCD 2760 F15F 44F2

To claim this, I am signing this object: