Skip to content

Instantly share code, notes, and snippets.

View Y-LyN-10's full-sized avatar
🏠
Working from home

Yulia Tenincheva Y-LyN-10

🏠
Working from home
View GitHub Profile
@Y-LyN-10
Y-LyN-10 / get-npm-package-version
Created April 16, 2021 12:25 — forked from DarrenN/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@Y-LyN-10
Y-LyN-10 / drift_checker.sh
Created May 27, 2020 17:34
Quick check to see if my terraform code is applied and/or there are any drifts
#!/bin/bash
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
drift_check() {
dir="$(basename $PWD)"
@Y-LyN-10
Y-LyN-10 / schedule.ps1
Last active February 6, 2020 12:14
Powershell - Schedule a task after 1 minute
SCHTASKS /Create /TN "Task Name" /TR something.exe /RU SYSTEM /RL HIGHEST /SC once /ST (Get-Date -Date ((Get-Date) + $(New-TimeSpan -Minutes 1)) -Format "HH:mm")
@Y-LyN-10
Y-LyN-10 / fix-a2dp.sh
Created January 20, 2020 16:52
Fix A2DP Sink profile, Bluetooth headphones on Archlinux
rm -rf ~/.config/pulse/
pulseaudio -k && pulseaudio -vvvvv
@Y-LyN-10
Y-LyN-10 / aws_cli_params.md
Created December 12, 2019 07:36
AWS CLI Parameter Store - get decrypted value only
$ aws ssm get-parameter --name /system/something_passphrase --region us-east-1 --with-decryption --query "Parameter.Value" --output text
> (Get-SSMParameterValue -Name /system/something_passphrase -WithDecryption 1).Parameters.Value
@Y-LyN-10
Y-LyN-10 / daskeyboard_q5_arch.md
Last active November 23, 2019 08:04
DAS Keyboard 5Q Firmware Installation on Arch Linux
This is a draft. Improvements are welcome.
$ systemctl | grep das # check if previous firmware is running and stop/disable it
das_keyboard_q-service.service
$ sudo systemctl stop das_keyboard_q-service.service 
$ sudo systemctl disable das_keyboard_q-service.service 
# Download the latest .deb package from the official website, then 
$ debtap -U das-keyboard-q_3.2.6.deb # give package name: daskeyboard-q 
$ sudo tar -xvf das-keyboard-q-3.2.6-1-x86_64.pkg.tar.xz -C /
@Y-LyN-10
Y-LyN-10 / toggle_bose35_profile.sh
Last active November 11, 2019 15:25
Toggle profiles of Bose35 headphones. When microphone is needed - use the "headset_head_unit", otherwise - use a2dp for high-quality audio.
#!/bin/sh
HEADPHONES_NAME='Bose'; # Replace with your unique (or not so) device name
INDEX=`pacmd list-cards | grep -B5 -P $HEADPHONES_NAME | head -1 | awk '{print $2}'`;
pacmd list-cards | grep "active profile: <a2dp_sink>"
TOGGLE=$?
if [ $TOGGLE -eq 0 ]; then
@Y-LyN-10
Y-LyN-10 / awscli_update_pass.md
Created October 24, 2019 06:39
Update password for AWS account from the AWS CLI
$ aws iam update-login-profile --user {username} --password {newpass}
@Y-LyN-10
Y-LyN-10 / install-postgres-9.6-centos7.md
Created July 18, 2018 14:14 — forked from Ch4s3/install-postgres-9.6-centos7.md
steps for installing postgres 9.6 on Centos7 or RHEL

Update the RPM package

rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-7.3-x86_64/pgdg-centos96-9.6-3.noarch.rpm

Update packages

yum update