Skip to content

Instantly share code, notes, and snippets.

ankyit / namespace-nginx.ts
Created Mar 11, 2020
Pulumi - Kubernetes
View namespace-nginx.ts
import * as k8s from "@pulumi/kubernetes";
import * as kx from "@pulumi/kubernetesx";
const clusterSvcsNamespace = new k8s.core.v1.Namespace("pulumi",undefined, undefined)
export const clusterSvcsNamespaceName =;
const appLabels = { app: "nginx" };
const deployment = new k8s.apps.v1.Deployment("nginx", {
metadata: {namespace: clusterSvcsNamespaceName},
spec: {
View get-list-of-network-interfaces-in-VPC
aws ec2 describe-network-interfaces --filters Name=vpc-id,Values=vpc-12345 --query "NetworkInterfaces[*].[NetworkInterfaceId,Description,VpcId,PrivateIpAddress]" --output table
ankyit /
Last active Nov 27, 2019
Terraform-AWS-EC2-Creation-V0.12 : This gist can help you create an EC2 instance on AWS with Terraform version 0.12.16
// Variable Definition
variable "aws_region" {}
variable "aws_vpc_cidr_block" {}
variable "aws_subnet_cidr_block" {}
variable "aws_private_ip_fe" {}
variable "aws_Name" {}
variable "aws_Application" {}
variable "aws_ami" {}
variable "aws_instance_type" {}
ankyit / Go-Install-Ubuntu
Created Jul 25, 2019
Go / Node #100daysofcode
View Go-Install-Ubuntu
1. Switch to root account
2. Navigate to /tmp
3. Download source by Running: wget
4. Extract files to /usr/local (update version number if needed) tar -C /usr/local -xzf go1.12.7.linux-amd64.tar.gz
5. edit /etc/.profile and add export PATH=$PATH:/usr/local/go/bin
6. source /etc/.profile
ankyit / 1. Installing Python - CentOS
Last active May 21, 2019
Python Programming - AOS
View 1. Installing Python - CentOS
sudo -i
yum groupinstall -y "development tools"
yum install -y \
libffi-devel \
zlib-devel \
bzip2-devel \
openssl-devel \
ncurses-devel \
sqlite-devel \
readline-devel \
#! /bin/bash
View User-commands.txt
### Go to the WordPress installation directory and apply following commands
1. To get list of users
wp users list
2. To get list of user login
wp users list --field=user_login
3. Update user password
wp user update <User_ID> --user_pass='Suer_Secure_Password'
#! /bin/bash
sudo add-apt-repository "deb xenial-pgdg main"
sudo wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.4
ankyit / .htaccess
Created Jul 13, 2018
WordPress Optimization htaccess
View .htaccess
<IfModule mod_expires.c>
ExpiresActive on
<FilesMatch "\.(gif|jpeg|jpg|png|ico|js|css|swf|svg)$">
ExpiresDefault "access plus 365 days"
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML und fonts
ankyit /
Created Jun 30, 2018
Install PostGres 9.4 on Ubuntu 17.10
#! /bin/bash
sudo add-apt-repository "deb zesty-pgdg main"
sudo wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.4
You can’t perform that action at this time.