This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Convert .Net Type to SqlDbType or DbType and vise versa | |
//This class can be useful when you make conversion between types .The class supports conversion between .Net Type , SqlDbType and DbType . | |
using System; | |
using System.Collections; | |
using System.Data; | |
namespace Devintelligence.Common.Data | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service fe8a Medium - - Unable to activate worker process proxy object within the worker process: ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000 | |
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service fe8c Medium - - Error activating the worker process manager instance within the worker process. - Inner Exception: System.InvalidOperationException: Unable to activate worker process proxy object within the worker process: ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000 at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.CreateWorkerProcessProxies() | |
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service ei0t Medium - Process creation/initialization threw an exception. Stopping this process. "ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data; | |
using System.Xml.Linq; | |
namespace LINQTest | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkcd() { mkdir -p "$@" && cd "$_"; } | |
..() { cd .. } | |
alias cls='clear' | |
alias ls='ls -altrh' | |
alias rmd='rm -rf $@' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## convert HTML POST data or HTTP GET query string to JSON | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#if ($context.httpMethod == "POST") | |
#set($rawAPIData = $input.path("$")) | |
#elseif ($context.httpMethod == "GET") | |
#set($rawAPIData = $input.params().querystring) | |
#set($rawAPIData = $rawAPIData.toString()) | |
#set($rawAPIDataLength = $rawAPIData.length() - 1) | |
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## convert HTML POST data or HTTP GET query string to JSON | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#if ($context.httpMethod == "POST") | |
#set($rawAPIData = $input.path("$")) | |
#elseif ($context.httpMethod == "GET") | |
#set($rawAPIData = $input.params().querystring) | |
#set($rawAPIData = $rawAPIData.toString()) | |
#set($rawAPIDataLength = $rawAPIData.length() - 1) | |
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Specify the region you want to run your scripts | |
region_val="ap-southeast-2" | |
#View Lambda function name asscoiated with ENIs in *in-use* status in a specific AWS region | |
aws ec2 describe-network-interfaces \ | |
--filters "Name=description,Values='AWS Lambda VPC ENI*'" "Name=status,Values='in-use'" \ | |
--query "NetworkInterfaces[].[RequesterId,Status,NetworkInterfaceId]" \ | |
--output text --region $region_val | |
#View Lambda function name asscoiated with ENIs in *available* status in a specific AWS region |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Search for lambda function by partial name across all AWS regions | |
#Excluding ap-northeast-3 region because of exception while calling list-functions for this region | |
aws ec2 describe-regions \ | |
--query 'Regions[?RegionName!=`ap-northeast-3`].[RegionName]' \ | |
--output text | \ | |
xargs -I {} \ | |
aws lambda list-functions \ | |
--query "Functions[].[FunctionArn]" \ | |
--output text --region {} | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Before executing the script ensure you have the latest version of AWS CLI installed | |
#pip install awscli --upgrade | |
import boto3 | |
s = boto3.Session() | |
print s.get_available_regions("lambda") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Note for invoking customer created APIGateway endpoint the servicename should be execute-api instead of apigateway | |
import boto3 | |
s = boto3.Session() | |
print s.get_available_services() |
OlderNewer