Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Sudar Abisheck SudarAbisheck

🎯
Focusing
Block or report user

Report or block SudarAbisheck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SudarAbisheck
SudarAbisheck / apigw-iam-sign-role-ec2.py
Created Mar 22, 2018
Signing AWS API requests using temp credentials obtained using the role attached to an EC2 instance
View apigw-iam-sign-role-ec2.py
import sys, os, base64, datetime, hashlib, hmac, json
import requests # pip install requests
# ************* REQUEST VALUES *************
method = 'GET'
service = 'execute-api'
host = 'api.example.com
region = 'us-east-1'
endpoint = 'https://api.example.com/user/hello'
request_parameters = ''
@SudarAbisheck
SudarAbisheck / base.yml
Last active Mar 21, 2018
Combining multiple Swagger+APIGW using jq
View base.yml
---
swagger: 2.0
basePath: /prod
info:
title: AwsSamExample
bschemes:
- https
paths:
/:
x-amazon-apigateway-any-method:
@SudarAbisheck
SudarAbisheck / schedule-lambda-asl.json
Created Feb 25, 2018
Amazon State Language (ASL) for created a state machine to schedule a one-time invocation of a Lambda function.
View schedule-lambda-asl.json
{
"Comment": "Invoking Lambda at arbitrary time.",
"StartAt": "CountDownTimer",
"States": {
"CountDownTimer": {
"Type": "Wait",
"TimestampPath": "$.invocationTime",
"Next": "InvokeLambda"
},
"InvokeLambda": {
@SudarAbisheck
SudarAbisheck / CustomGenesis.json
Created Jul 8, 2017
Custom Genesis file to initialize ethereum using geth init
View CustomGenesis.json
{
"config": {
"chainId": 13,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"difficulty": "200000000",
"gasLimit": "2100000",
"alloc": {
@SudarAbisheck
SudarAbisheck / 51-android.rules
Created Jan 27, 2016
udev rules for android device
View 51-android.rules
# udev rule to detect android devices
# These rules refer to http://developer.android.com/tools/device.html
# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
# Azpen Onda
@SudarAbisheck
SudarAbisheck / px
Last active May 14, 2019
Shell Script to set proxy in Ubuntu
View px
#!/bin/sh
_DOMAIN="proxy.ssn.net"
_PORT=8080
_IGNORE_PROXY="'*.ssn.net'"
_ENV_FILE_PATH="/etc/environment"
_APT_FILE_PATH="/etc/apt/apt.conf"
_MODE_MANUAL="manual"
_MODE_NONE="none"
You can’t perform that action at this time.