Skip to content

Instantly share code, notes, and snippets.

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

amol amolv

🏠
Working from home
View GitHub Profile
function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,
@amolv
amolv / deleteByQuery.py
Created October 15, 2018 13:22 — forked from yoshi0309/deleteByQuery.py
delete documents by query result for Amazon CloudSearch.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import urllib
import urllib2
import json
# you need to set your domain endpoints.
SEARCH_ENDPOINT = "XXXXX.us-east-1.cloudsearch.amazonaws.com"
DOCUMENT_ENDPOINT = "XXXXX.us-east-1.cloudsearch.amazonaws.com"
@amolv
amolv / jenkins-notes.md
Created November 15, 2017 11:44 — forked from misterbrownlee/jenkins-notes.md
Jenkins setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

@amolv
amolv / Custom_Reg.php
Created August 29, 2016 18:29 — forked from gmazzap/Custom_Reg.php
Just a rough plugin example to answer a WPSE question: How to display Wordpress User Registration Form in front-end of the website?
<?php
namespace Custom_Reg;
class Custom_Reg {
protected $form;
protected $saver;
function __construct( Form $form, Saver $saver ) {

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.