Skip to content

Instantly share code, notes, and snippets.

View asvignesh's full-sized avatar

Vignesh A Sathiyanantham asvignesh

View GitHub Profile
@asvignesh
asvignesh / Build_seed_iso
Created January 6, 2018 07:42
Samples to create a cloud-init configuration ISO.
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
@asvignesh
asvignesh / functions.php
Created May 27, 2015 14:55
Embed your GIST code in your WordPress blog post without using any plugins
<?php
/**
* Usage:
* Paste a gist link into a blog post or page and it will be embedded eg:
* https://gist.github.com/2926827
*
* If a gist has multiple files you can select one using a url in the following format:
* https://gist.github.com/2926827?file=embed-gist.php
*/
@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 / delete_Snapshots.py
Created January 28, 2018 11:22
Delete old EBS snapshots using Boto3 AWS Lambda Python
from datetime import datetime, timedelta, timezone
import boto3
class Ec2Instances(object):
def __init__(self, region):
print("region "+ region)
self.ec2 = boto3.client('ec2', region_name=region)
@asvignesh
asvignesh / deployvm.sh
Created January 2, 2019 17:23
Deploy multiple virtual machines from template using powercli
# Specify vCenter Server, vCenter Server username and vCenter Server user password
$vCenter="lab.asvignesh.in"
$vCenterUser="administrator@vsphere.local"
$vCenterPassword="secretPassword"
#
# Specify number of VMs
$vm_count = "100"
#
# Specify the template
$tempate = "W2k12"
@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",