Skip to content

Instantly share code, notes, and snippets.

View asvignesh's full-sized avatar

Vignesh A Sathiyanantham asvignesh

View GitHub Profile
@Component
@Slf4j
public class AwsRequestHandlerDi {
private static final Map<ApplicationCommands, INimesaAwsJob> myServiceCache = new HashMap<>();
private final List<INimesaAwsJob> handlers;
@Autowired
private AwsRequestHandlerDi(List<INimesaAwsJob> handlers) {
@asvignesh
asvignesh / Output
Created October 11, 2021 17:25
C# LIST
Creating 3 Students and add to List
Print all 3 Students
1, Ramya, CSE
2, Devi, CSE
3, Priya, IT
Find department of a student name Ramya
CSE
Remove 2nd student from list
Print all 2 Students
1, Ramya, CSE
@asvignesh
asvignesh / IAMROLE
Created July 1, 2021 11:02
S3 bucket replication
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:GetObjectVersionForReplication",
"s3:GetObjectVersionAcl",
"s3:GetObjectVersionTagging"
],
@asvignesh
asvignesh / mysql.yaml
Created January 24, 2021 15:39
MySQL K8 Deployment with the PV and PVC
---
apiVersion: v1
kind: Service
metadata:
name: mysql
labels:
app: asvignesh
spec:
ports:
- port: 3306
@asvignesh
asvignesh / vpc.json
Created January 19, 2021 11:21
Nimesa Permission for VPC Backup and Clone
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DeleteSubnet",
"ec2:CreateVpc",
"ec2:DescribeDhcpOptions",
@asvignesh
asvignesh / php_zts_pthread.md
Last active June 9, 2023 17:19
Install PHP ZTS and enable the pThread

Install packages needed for compiling

sudo apt-get update

sudo apt install autoconf automake bison build-essential curl flex \
  libtool libssl-dev libcurl4-openssl-dev libxml2-dev libreadline7 \
  libreadline-dev libsqlite3-dev libzip-dev libzip4 nginx openssl \
  pkg-config re2c sqlite3 zlib1g-dev
 
@asvignesh
asvignesh / mongo_post.sh
Created May 8, 2020 14:53
MongoDB application consistent pre-post backup script
mongo --eval 'db.fsyncUnlock()' --quiet
@asvignesh
asvignesh / ClientBean.java
Created March 22, 2020 14:52
Spring Boot Config Client
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class ClientBean {
@Value("${k1}")
private String k1;
public String getK1() {
@asvignesh
asvignesh / ConfigurationServiceApplication.java
Created March 22, 2020 14:32
Spring Boot Config Server
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@EnableConfigServer
@SpringBootApplication
public class ConfigurationServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigurationServiceApplication.class, args);
}
@asvignesh
asvignesh / IAM Role.json
Created March 8, 2020 14:51
Create EC2 Consistent Backup
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Action": [
"ec2:CreateSnapshot",
"ec2:CreateTags",
"ec2:DescribeInstanceAttribute"