Skip to content

Instantly share code, notes, and snippets.

View nrashok's full-sized avatar
🎯
Focusing

Ashok nrashok

🎯
Focusing
View GitHub Profile
@nrashok
nrashok / alpine-tools.md
Created December 18, 2024 06:54 — forked from bruno-brant/alpine-tools.md
alpine: add curl, telnet ect

Tooling in alpine builds

Pretty usual to have to diagnose docker containers based on alpine distros. But the image never comes with basic tools. How do we add it?

apk update						      # update the local registry
apk add busybox-extras			# install telnet and some other basic tools
apk add curl
@nrashok
nrashok / set_selinux_permissive.sh
Created November 19, 2024 14:19
Shell script to set SELinux to permissive mode permanently on Oracle Linux
#!/bin/bash
# Check if running as root
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root or with sudo."
exit 1
fi
# Backup existing SELinux configuration
CONFIG_FILE="/etc/selinux/config"
@nrashok
nrashok / code-stack.ts
Created October 12, 2023 13:12 — forked from sebsto/code-stack.ts
CDK Create EC2 instace in private subnet. Install Nginx.
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/core');
import { Fn, Tag, Resource } from '@aws-cdk/core';
import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2';
import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam'
/**
* Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK
* These classes abstract low level details from CloudFormation
frs/admin/qrs.php
__admin
__cache/
__index.php
__MACOSX
__pma___
__SQL
__test.php
_.htpasswd
_adm
@nrashok
nrashok / mat.yaml
Created November 23, 2021 15:59
MATRIX
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
#!/bin/bash
##Tenny Susanto
##2017-11-09
##download messages from Kafka partition by partition
##do not use this in a Kakfa queue that is constantly receiving new messages
##this should only be used for manual pull for historical data done by platform team (they dump the data into Kafka once and don't write to it)
##This file contains the login/password to the Kafka server
export KAFKA_OPTS="-Djava.security.auth.login.config=/path/jass.conf"
@nrashok
nrashok / Cassandra backup & restore
Last active March 9, 2021 20:07 — forked from sdluxeon/Cassandra backup & restore
CASSANDRA SNAPSHOTING
//READ nodetool snapshot documentation in cassandra
//READ stack-overflow-topic gist or directly in stackoverflow -> http://stackoverflow.com/questions/25465904/how-can-i-restore-cassandra-snapshots
//EXPORT the databases schemas
cqlsh -e "DESCRIBE SCHEMA" > my_backup_name.schema
//Create snapshot of the whole server
nodetool snapshot my_backup_name
//Compress the backups
@nrashok
nrashok / index.html
Created October 24, 2020 11:44 — forked from jbesw/index.html
Serverless Form Example
<!--
MIT No Attribution
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
@nrashok
nrashok / debezium-installation.adoc
Created August 25, 2020 00:37 — forked from jpsoroulas/debezium-installation.adoc
Debezium installation procedure for PostgreSQL without docker

Debezium installation

@nrashok
nrashok / kafka-oracle-vm-config.md
Created August 24, 2020 16:26 — forked from dyoung522/kafka-oracle-vm-config.md
kafka installation with systemd
  1. Install Kafka

    cd /opt
    curl -O http://www.gtlib.gatech.edu/pub/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz
    tar xvzf kafka_2.11-0.11.0.0.tgz
    ln -s kafka_2.11-0.11.0.0/ kafka
  2. Edit /usr/lib/systemd/system/kafka-zookeeper.service