Skip to content

Instantly share code, notes, and snippets.

View beingadityak's full-sized avatar
🎯
Focusing

Aditya K beingadityak

🎯
Focusing
View GitHub Profile
@beingadityak
beingadityak / startship.toml
Created November 12, 2021 07:05
Aditya's starship config
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[[battery.display]]
threshold = 30
style = "bold red"
@beingadityak
beingadityak / create-elastic-certs.sh
Created November 9, 2021 12:18 — forked from Sudharma/create-elastic-certs.sh
Generate Certificates for Elastic nodes
#!/bin/bash
set -e
if [[ -z $CA_PASSWD ]] || [[ -z $CERT_PASSWD ]] ; then
echo " Provide CA Password [CA_PASSWD] and Cert password [CERT_PASSWD] before hand"
exit 1
fi
rm -f elastic-certificates.p12 elastic-certificate.pem elastic-stack-ca.p12 || true
#password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm $(ELASTICSEARCH_IMAGE) /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \
docker run --name elastic-helm-charts-certs -i -w /app \
@beingadityak
beingadityak / create_vm.sh
Created March 10, 2021 05:12 — forked from sickbock/create_vm.sh
VirtualBox PXE boot
#!/bin/bash
cd ${myVMs}
MyVM=testvm
vboxmanage unregistervm ${MyVM} --delete
rm -rf ${MyVM}
mkdir ${MyVM}
cd ${MyVM}
vboxmanage createhd --filename ${MyVM}.vdi --size 30720
vboxmanage createvm --name ${MyVM} --ostype RedHat_64 --register
vboxmanage modifyvm ${MyVM} --memory 6172 --vram=12 --acpi on --nic1 NAT # optional second NIC # --nic2 bridged --bridgeadapter2 enp0s25
@beingadityak
beingadityak / generate-keypairs.sh
Last active December 1, 2022 02:27
Generate CloudFront Signed URLs for your private content
#!/usr/bin/env bash
openssl genrsa -out private_key.pem 2048 # generate an RSA private key of 2048 bits
openssl rsa -pubout -in private_key.pem -out public_key.pem # Generate the public key from the private key
@beingadityak
beingadityak / starship.toml
Created February 21, 2021 14:36 — forked from ryo-ARAKI/starship.toml
Starship configuration file
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[[battery.display]]
threshold = 30
style = "bold red"

Keybase proof

I hereby claim:

  • I am beingadityak on github.
  • I am beingadityak2 (https://keybase.io/beingadityak2) on keybase.
  • I have a public key ASCw_U1V5RlesScTGXrQOD_akHVwbn9H867cj1VAWrXa0wo

To claim this, I am signing this object:

@beingadityak
beingadityak / .travis.yml
Last active December 6, 2020 14:22
Travis CI - Sample web application deployment on commit
language: node_js
node_js:
- lts/*
# Add the lines from here apart from the auto-generated stuff
before_install:
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
@beingadityak
beingadityak / instructions.md
Last active November 22, 2020 10:26
TLDR instructions and template - Supervisor service

Instructions for modifying and using the conf file - Supervisor

  1. Install supervisor -> pip install supervisor
  2. Modify the template for your use case and save the file in /etc/supervisor/conf.d/<app-name>.conf Eg. /etc/supervisor/conf.d/sample-webapp.conf
  3. Run supervisorctl reread and supervisorctl update all
  4. Verify the status with supervisorctl status all
@beingadityak
beingadityak / example-webapp.service
Created November 22, 2020 10:12
TLDR instructions and template - SystemD service
[Unit]
Description=My awesome webapp
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/var/www/webapp.bin
[Install]
WantedBy=multi-user.target
@beingadityak
beingadityak / install-docker-cloud-config.yml
Last active August 16, 2020 16:23
Docker installation - Cloud Config
#cloud-config
apt_update: true
apt_upgrade: true
ssh_authorized_keys:
- SSH_KEY_HERE
packages:
- apt-transport-https