Skip to content

Instantly share code, notes, and snippets.

View vadirajks's full-sized avatar

Vadiraj K.S vadirajks

View GitHub Profile
@vadirajks
vadirajks / Alpha vs Beta Apps and Nightly vs Production Builds
Created October 12, 2019 07:01
Alpha vs Beta Apps and Nightly vs Production Builds
https://instabug.com/blog/alpha-vs-beta-apps/
https://stackoverflow.com/questions/46786486/alpha-beta-snapshot-release-nightly-milestone-release-candidaterc-whe
RC = Release candidate; probably feature complete and should be pretty stable - problems should be relatively rare and minor, but worth reporting to try to get them fixed for release.
GA = General availability (a release); should be very stable and feature complete
++++++++++++++++++++++++++++++++++
Alpha:
The alpha phase of the release life cycle is the first phase to begin software testing (alpha is the first letter of the Greek alphabet, used as the number 1). In this phase, developers generally test the software using white-box techniques. Additional validation is then performed using black-box or gray-box techniques, by another testing team. Moving to black-box testing inside the organization is known as alpha release
@vadirajks
vadirajks / ubuntu-aliyun-mirrors.sh
Created March 20, 2023 11:56 — forked from wsvn53/ubuntu-aliyun-mirrors.sh
Change Ubuntu source to aliyun mirrors
#!/bin/bash
cat << EOF > /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

Resize splits more quickly EDIT

SHARE Tip 1215 Printable Monobook Previous Next created April 26, 2006 · complexity basic · author Robert & Bill · version 7.0

This tip is about how to resize Windows efficiently.

You can use the :resize command or its shortcut :res to change the height of the window. To change the height to 60 rows, use:

@vadirajks
vadirajks / How to Customize Time & Date Format in Ubuntu Panel
Last active January 29, 2023 16:54
How to Customize Time & Date Format in Ubuntu Panel
gsettings set org.ayatana.indicator.datetime time-format 'custom'
gsettings set org.ayatana.indicator.datetime custom-time-format '[%B/%A]-[%d-%m-%Y]-[%H:%M]-[%l:%M:%S %P]'
https://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/
@vadirajks
vadirajks / gcp_commitments_alert.sh
Last active December 26, 2022 16:58
gcp_commitments_slack_alert
#!/bin/bash
SlackChannelName=slack-channel
SlackHookURL="https://hooks.slack.com/services/dsdsdsdsds"
MessageBody=
MessageTitle="CRITICAL:/custom-scripts/gcp_commitments_alert.sh ($(hostname)/$(hostname -i))"
for project in prokect1 project2; do
gcloud compute commitments list --project $project --format="csv(selfLink.scope(regions),name,resources,startTimestamp.date('%Y-%m-%d'),endTimestamp.date('%Y-%m-%d'),type,status)" | sed "s/\"{'type': '//g" | sed "s/', 'amount': '/=/g" | sed "s/'}\",/,/g" | sed "s/'}\";/:/g" | awk -F ',' '{gsub(/[\/].*/, "", $1); print}' OFS="," > /tmp/commitments_${project}.txt || exit 2
sed -i '/^self_link/d' /tmp/commitments_${project}.txt 2> /dev/null || continue
COUNT=0
for region in $(awk -F, '{print $1}' /tmp/commitments_${project}.txt | sort | uniq); do
@vadirajks
vadirajks / client.yaml
Created December 24, 2022 10:20 — forked from HebertCL/client.yaml
Issue 5344
# This playbook was meant to be executed after provisioning.
# Initially client side certificates where created during
# image cooking, but soon figured out it would not work in
# the long run. When I changed it to post provision execution
# I found errors that mentioned certificates already existed
# and found the issue described in GitHub.
---
- hosts: all
become: yes
@vadirajks
vadirajks / statsd and graphite testing
Last active November 10, 2022 10:53
statsd and graphite testing
$ cat /scripts/graphit_test.sh
#!/bin/bash
#benchmark.statsdtest.random.histograms:${RANDOM} ${epoch}\n \
#benchmark.statsdtest.random.meters:${RANDOM} ${epoch}\n \
#benchmark.statsdtest.random.sets:${RANDOM} ${epoch}\n \
epoch=$(date +%s)
which node || { echo "node missing"; exit 2; }
[ -z "$1" ] && { echo "GRAPHITE_SERVER details missing"; exit 2; }
GRAPHITE_SERVER=$1
GRAPHITE_CARBON_PORT=2003
@vadirajks
vadirajks / gcp-instance-group_details.sh
Created August 14, 2022 13:29
gcp-instance-group_details.sh
IFS=$'\n'
echo "INSTANCE-GROUPS,LOCATION,SCOPE,INSTANCE-TEMPLATES,IMAGE"
for ig in $(gcloud compute instance-groups list | grep -v "^dataflow\|^NAME\|^gke"); do
result=$(echo $ig|awk 'BEGIN { OFS="," }{print $2,$3}')
tmresult=$(gcloud compute instance-groups managed describe $(echo $ig|awk '{print $1}') --zone $(echo $ig|awk '{print $2}') --format=json | jq -r "[.instanceGroup,.instanceTemplate]|@csv")
for i in $(echo ${tmresult}) ; do
set $(echo $i | tr "," "\n"|tr -d '"')
image=$(gcloud compute instance-templates describe ${2##*/} --format=json | jq -r ".properties|.disks[].initializeParams.sourceImage")
echo ${1##*/},$result,${2##*/},${image##*/}
done
@vadirajks
vadirajks / find or delete corrupt whisper-files
Created July 16, 2022 12:37
find or delete corrupt whisper-files
#!/bin/bash
which whisper-info >/dev/null || {
echo >&2 "'whisper-info' not found: please install"
exit 1
}
options=('find' 'delete')
PS3='state your wish: '
echo -e "\nfind/delete corrupt whisper-files"