Skip to content

Instantly share code, notes, and snippets.

View sasankmukkamala's full-sized avatar

Sasank Mukkamala sasankmukkamala

View GitHub Profile
@sasankmukkamala
sasankmukkamala / ddb-kinesis-lambda.py
Created April 6, 2019 20:51
Send Existing Data from Dynamodb to AWS Lambda via Kinesis by scanning entire table.
import boto3
import boto3.dynamodb.types
import json
# Load the service resources in the desired region.
session = boto3.Session(profile_name='default')
dynamodb = session.resource('dynamodb', region_name="ap-south-1")
kinesis = session.client('kinesis', region_name="ap-south-1")
# Set names for ddb table and ks stream
@sasankmukkamala
sasankmukkamala / wp-seo-remove-debugmarker.php
Last active June 22, 2016 11:16
Remove WP SEO (Yoast) HTML Comments (Debug Marker).
<?php
function remove_yoastdebugmarker(){
if(defined( 'WPSEO_VERSION' )) {
$wpseo_front = null;
if ( isset( $GLOBALS['wpseo_front'] ) )
$wpseo_front = $GLOBALS['wpseo_front'];
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
$wpseo_front = WPSEO_Frontend::get_instance();
remove_action( 'wpseo_head', array($wpseo_front, 'debug_marker') , 2 );
}
@sasankmukkamala
sasankmukkamala / gmailactions-subscriptionmail.php
Last active August 29, 2015 14:25
Adding Gmail’s One-click Action Button to MailPoet’s Signup Confirmation Email. Add this code to the functions.php file of your theme.
<?php
add_action('wysija_replaceusertags', add_gmailactions_subscriptionmail, 13, 2);
function add_gmailactions_subscriptionmail($email,$receiver){
if(strpos($email->subject, ‘{{subject of email without quotes}}')) {
preg_match("/(?:<a href=\")(.*?)\"/", $email->body, $matches);
$gmailActionMicroData = '