Skip to content

Instantly share code, notes, and snippets.

View yashwant's full-sized avatar
🏠
Working from home

Yashwant Gaikawad yashwant

🏠
Working from home
View GitHub Profile
@yashwant
yashwant / install-psycopg2-with-python3.sh
Created December 13, 2023 13:04
Install psycopg2 on AWS linux
sudo yum install gcc python3 python3-devel postgresql-devel
sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | python3
pip3 install psycopg2
@yashwant
yashwant / EKS_RDS_VPC_Peering_script.sh
Created December 5, 2022 09:33 — forked from imranity/EKS_RDS_VPC_Peering_script.sh
VPC Peering Between EKS and RDS postgres
#!/bin/bash -xe
## Create a VPC Peering connection between EKS and RDS Postgres
echo """ run this script as:
./eks-rds-peering.sh
+ read -p 'Enter name of EKS Cluster: ' EKS_CLUSTER
Enter name of EKS Cluster: xolv-dev-cluster
+ EKS_VPC=eksctl-xolv-dev-cluster-cluster/VPC
+ EKS_PUBLIC_ROUTING_TABLE=eksctl-xolv-dev-cluster-cluster/PublicRouteTable
+ read -p 'Enter name of RDS: ' RDS_DB_NAME
Enter name of RDS: sfstackuat
@yashwant
yashwant / aws_regions_list.json
Created December 24, 2021 18:16
AWS Regions List
[
{
"location": "US East (Ohio)",
"id": "us-east-2"
},
{
"location": "US East (N. Virginia)",
"id": "us-east-1"
},
{
@yashwant
yashwant / aws_regions_list.csv
Created December 24, 2021 18:15
AWS Regions
US East (Ohio) us-east-2
US East (N. Virginia) us-east-1
US West (N. California) us-west-1
US West (Oregon) us-west-2
Africa (Cape Town) af-south-1
Asia Pacific (Hong Kong) ap-east-1
Asia Pacific (Jakarta) ap-southeast-3
Asia Pacific (Mumbai) ap-south-1
Asia Pacific (Osaka) ap-northeast-3
Asia Pacific (Seoul) ap-northeast-2
@yashwant
yashwant / libreadline_7_not_found.sh
Last active February 12, 2019 03:35
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError) after updating OS to macOs mojave
ln -s /usr/local/opt/readline/lib/libreadline.8.0.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains dev.mysql.com, www.mysql.com, mysql.com \
--no-parent \
dev.mysql.com
<!DOCTYPE html>
<html>
<head>
<script>
window.MediaSource = window.MediaSource || window.WebKitMediaSource;
function testTypes(types) {
for (var i = 0; i < types.length; ++i)
console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i]));
}
function onLoad() {

Keybase proof

I hereby claim:

  • I am yashwant on github.
  • I am yashwant (https://keybase.io/yashwant) on keybase.
  • I have a public key ASD3_BaE9AZDBZ3aIZYgZhtrp05k0Nmw7PZVYYd_Jk18zgo

To claim this, I am signing this object:

CREATE TABLE `apps_countries` (
`id` int(11) NOT NULL auto_increment,
`country_code` varchar(2) NOT NULL default '',
`country_name` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `apps_countries`
--
INSERT INTO `apps_countries` VALUES (null, 'AF', 'Afghanistan');
@yashwant
yashwant / Javascript_convert_base64_to_blob.js
Created September 5, 2017 22:12
Javascript: convert base64 to blob
function dataURItoBlob(dataURI, callback) {
// convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs
var byteString = atob(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]
// write the bytes of the string to an ArrayBuffer
var ab = new ArrayBuffer(byteString.length);