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 / 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
#!/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

@nrashok
nrashok / batch-delete-gmail-emails.js
Created August 18, 2020 12:39 — forked from gene1wood/batch-delete-gmail-emails.js
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts will delete 500 emails and
can be triggered to run every minute without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Configure the search query in the code below to match the type of emails
you want to delete
Browser to https://script.google.com/.
Start a script and paste in the code below.
After you past it in, save it and click the little clock looking button.
@nrashok
nrashok / read-access.sql
Created July 16, 2020 19:09 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;