Skip to content

Instantly share code, notes, and snippets.

@paavan98pm
paavan98pm / get_sigv4.py
Created August 13, 2018 20:55
AWS Version 4 Signing
# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. See the License for the specific
@paavan98pm
paavan98pm / init.vim
Last active January 6, 2019 21:07
.config/nvim/init.vim
"Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
let g:mapleader = "\<Space>"
function! BuildComposer(info)
if a:info.status != 'unchanged' || a:info.force
if has('nvim')
!cargo build --release
else
!cargo build --release --no-default-features --features json-rpc
@paavan98pm
paavan98pm / tmux.conf
Created August 9, 2018 19:26
tmux configuration from tmux-config
# ==========================
# === General settings ===
# ==========================
set -g default-terminal "screen-256color"
set -g history-limit 20000
set -g buffer-limit 20
set -sg escape-time 0
set -g display-time 1500
set -g remain-on-exit off
@paavan98pm
paavan98pm / secrets_manager.js
Created June 5, 2018 08:34
Lambda function in Node.js to call AWS Secrets Manager's GetSecretValue and getRandomPassword API Calls
'use strict';
module.exports.hello = (event, context, callback) => {
var AWS = require('aws-sdk'),
endpoint = "https://secretsmanager.us-east-1.amazonaws.com",
region = "us-east-1",
secretName = "test/secret",
secret,
binarySecretData;
@paavan98pm
paavan98pm / main.go
Created May 29, 2018 10:02 — forked from julz/main.go
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {