Skip to content

Instantly share code, notes, and snippets.

View rprakashg's full-sized avatar
🎯
Focusing

Ram Gopinathan rprakashg

🎯
Focusing
View GitHub Profile
@rprakashg
rprakashg / seed-sqsqueue-with-s3-notification-messages
Last active February 3, 2022 21:36
bash script to create SQS messages for files added to S3 between a specific date range
#!/bin/bash
profile={replace}
s3bucket={replace}
folder={specify}
queueprefix={replace}
purge-sqs-queue() {
if [ -z "$1" ]; then
echo "need to pass queue name prefix"
@rprakashg
rprakashg / UploadFileToBlobStorage
Created May 20, 2015 21:53
Upload file to Azure Blob Storage
param(
[string] $Source,
[string] $FileToUpload,
[string] $StorageAccountName,
[string] $StorageContainerName,
[string] $AzCopyPath
)
$StorageAccountKey = (Get-AzureStorageKey -StorageAccountName $StorageAccountName).Primary
$StorageAccountContext = New-AzureStorageContext $StorageAccountName (Get-AzureStorageKey $StorageAccountName).Primary
@rprakashg
rprakashg / JsonExtensions.cs
Created March 1, 2015 03:54
ToJson extension methods for serializing objects to json uses CamelCasePropertyNamesContractResolver so serialized string will follow camel casing
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
public static class JsonExtensionMethods
{
@rprakashg
rprakashg / NinjectableWorkerRole.cs
Created March 1, 2015 03:35
abstract class that can be used when implementing worker roles that supports dependency injection with ninject
namespace Marview.Azure.Common
{
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
using Ninject;
using System.Net;