Skip to content

Instantly share code, notes, and snippets.

View jayar95's full-sized avatar

Jorge Lopez Johnson jayar95

View GitHub Profile
#FORCE MIC VOLUME
cat <<'EOF' >> ~/.bashrc
### Want to see if linux is gonna change mic volume!!!
export MICVOLUME=35
export MICCALC=$(bc <<< "scale=2; 65535 * ($MICVOLUME / 100)" | grep -oP '^\d+')
while sleep 0.25; do
export MICNAME=$(pacmd list-sources | grep -zoP '\*.*\n.*name.*<(.+)>' | grep -zoP '<.*>' | grep -UzoP '[^<>]' | tr -d '\n')
pacmd set-source-volume $MICNAME $MICCALC
done
EOF
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 5, 2024 19:12
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@asc-adean
asc-adean / azure-keyvault-backup-different-subscriptions.sh
Created May 8, 2020 18:21
Azure Backup/Restore Keyvault Scripts
#!/bin/bash
# Make sure you are logged into the correct context via `az account set`
# Make sure you also delete the tmp folder as those secrets will be sitting on your filesystem in plain text!!!!!!!!!
vault_name=$1
if [[ -z $vault_name ]]; then
echo "Please supply vault name as an argument to this script"
@seratch
seratch / index.js
Last active November 4, 2021 04:02
Workflow Builder: Steps from apps - https://api.slack.com/workflows/steps
const config = require("dotenv").config().parsed;
for (const k in config) {
process.env[k] = config[k];
}
// npm install @slack/bolt@feat-workflow-steps
const { App } = require("@slack/bolt");
const app = new App({
signingSecret: process.env.SLACK_SIGNING_SECRET,
token: process.env.SLACK_BOT_TOKEN,
@riccardopedrielli
riccardopedrielli / ubuntu-workstation-setup.sh
Last active February 7, 2023 12:33
Ubuntu workstation setup
#!/usr/bin/env bash
set -Eeu
trap 'STATUS=${?}; echo "${0}: Error on line ${LINENO}: ${BASH_COMMAND}"; exit ${STATUS}' ERR
trap 'rm -rf ${tempDir}' EXIT
readonly supportedUbuntuVersion="22.04"
readonly tempDir="/tmp/setup"
readonly devDir="${HOME}/dev"
readonly scriptsDir="${devDir}/scripts"
@jayar95
jayar95 / incident-response.md
Created November 16, 2022 16:35
generic incident response framework

Incident Response

Objectives

The objective of any incident is to resolve the impact as quickly as possible (responsibly). This incident response framework will provide process and guidelines to achieve maximum availability for our Customers while taking into consideration the wellbeing of our engineers and stakeholders.

Note: The "Customers" are usually end-users in most contexts, but can vary by incident. For instance, if all of our build agents broke and pipelines were completely unavailable, the "Customers" would be internal engineers in the context of that incident.

Suggested Reading

@vizsumit
vizsumit / LoraConfig.json
Last active June 12, 2024 12:44
settings for Kohya_ss LoRA Training
{
"LoRA_type": "Standard",
"adaptive_noise_scale": 0,
"additional_parameters": "",
"block_alphas": "",
"block_dims": "",
"block_lr_zero_threshold": "",
"bucket_no_upscale": true,
"bucket_reso_steps": 64,
"cache_latents": true,