Skip to content

Instantly share code, notes, and snippets.

@abraithwaite
abraithwaite / chill-zoom.sh
Last active May 8, 2024 08:43
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
@ig0rsky
ig0rsky / update-all-asdf-plugins.sh
Last active April 22, 2024 02:06
Update all asdf plugins to latest
#!/usr/bin/env bash
function log () {
printf "%s %s\n" "->" "$1"
}
log "Updating all asdf-plugin remotes..."
asdf plugin update --all
@xbalaji
xbalaji / oneliners-aws-ssm.sh
Last active September 27, 2023 15:21
aws ssm cli
export AWS_DEFAULT_PROFILE=""
# to display parameter store variables for aws latest linux
aws ssm get-parameters-by-path --path "/aws/service/ami-amazon-linux-latest" --region us-west-2
# get the list of parameter store variables in the account
aws ssm describe-parameters | jq '.Parameters[].Name'
# remove the last path and filter higher level path
aws ssm describe-parameters | jq '.Parameters[].Name' | sed -e 's,\(.*\)/.*,\1",g' | sort | uniq
@steven2358
steven2358 / ffmpeg.md
Last active July 4, 2024 19:48
FFmpeg cheat sheet
@jondlm
jondlm / kdebug.bash
Last active February 20, 2019 09:24
Kubernetes Fuzzy Helper Scripts
#!/usr/bin/env bash
# vim: set syntax=sh:
set -e
if ! hash kubectl 2>/dev/null; then echo "Please install \`kubectl\` before running this command (https://kubernetes.io/docs/tasks/tools/install-kubectl/)"; exit 1; fi
if ! hash fzf 2>/dev/null; then echo "Please install \`fzf\` before running this command (https://github.com/junegunn/fzf#installation)"; exit 1; fi
selection=`kubectl get pods --all-namespaces | grep -v 'NAMESPACE' | fzf --header "Select a pod..."`
namespace=`echo "$selection" | awk '{ print $1 }'`
pod=`echo "$selection" | awk '{ print $2 }'`
@jpswade
jpswade / devops_best_practices.md
Last active June 26, 2024 07:47
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing

@linar-jether
linar-jether / simple_python_datasource.py
Last active May 24, 2023 01:22
Grafana python datasource - using pandas for timeseries and table data. inspired by and compatible with the simple json datasource ---- Up-to-date version maintained @ https://github.com/panodata/grafana-pandas-datasource
from flask import Flask, request, jsonify, json, abort
from flask_cors import CORS, cross_origin
import pandas as pd
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
@jfriv
jfriv / prod-rds-snap-restore-to-dev-temp.sh
Created August 16, 2016 20:03
RDS manual snapshot and restore script
#!/bin/bash
# set up some variables
NOW_DATE=$(date '+%Y-%m-%d-%H-%M')
RESTORE_FROM_INSTANCE_ID=<source name>
TARGET_INSTANCE_ID=<target name>
TARGET_INSTANCE_CLASS=db.m4.large
VPC_ID=<vpc subnet id>
NEW_MASTER_PASS=<root password>

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23