Skip to content

Instantly share code, notes, and snippets.

View mrdotkg's full-sized avatar
💇‍♂️
WFH

Kr Gaurav mrdotkg

💇‍♂️
WFH
  • Butterops Dev Community
  • Varanasi
View GitHub Profile
@mrdotkg
mrdotkg / shec2.py
Last active September 9, 2021 02:32
Shell into ec2 through ssm
#!/usr/bin/python3
"""Usage:
sh_ec2.py [--instance=<instance_id>]
sh_ec2.py -h | --help
sh_ec2.py --version
Options:
-h --help Show this screen
-i --instance=<instance_id> EC2 instance id
--version Show version
@aormsby
aormsby / hugo-deploy.sh
Last active December 20, 2021 14:08
A sweet shell deploy script for Hugo sites - built with submodules in mind, but easy to modify for use without them. Runs with options, see blog for full rundown - https://www.adamormsby.com/posts/hugo-shell-deploy-script/
#!/bin/sh
# region settings
# BUILD/DEPLOY SETTINGS - edit as needed for your use case
PUB_SUBMODULE="public" # name of output folder where git submodule is located
IGNORE_FILES=". .. .git CNAME" # space-delimited array of files to protect when 'fresh' option is used
DEV_BRANCHES="dev dev" # development branches to build on and push to, 1-root, 2-pubmodule
PROD_BRANCHES="master master" # production branches to build on and push to, 1-root, 2-pubmodule
# endregion
@mrdotkg
mrdotkg / elementary-dev-setup.sh
Last active April 30, 2018 07:06
Scripts to setup development environment on Elementary OS Loki (0.4)
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# base os cleanup
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
sudo apt-get update -y && sudo apt-get dist-upgrade -y
sudo apt-get purge -y epiphany-browser epiphany-browser-data #browser
sudo apt-get purge -y midori-granite #browser
sudo apt-get purge -y noise
sudo apt-get purge -y scratch-text-editor #text-editor
sudo apt-get purge -y modemmanager
sudo apt-get purge -y geary #email
@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@leonardofed
leonardofed / README.md
Last active September 19, 2024 07:07
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@fbrnc
fbrnc / cw_exp.js
Created March 4, 2016 06:29
AWS Lambda function that collects relevant metrics from CloudWatch and pushes them to ElasticSearch
var AWS = require('aws-sdk');
var cloudwatch = new AWS.CloudWatch({ region: 'us-east-1'});
exports.handler = function (event, context) {
var ElasticSearchHost = 'elasticsearch.example:9200';
var Environment = 'int';
var EndTime = new Date;
var StartTime = new Date(EndTime - 15*60*1000);
var Metrics = {
@maxim
maxim / gh-dl-release
Last active September 4, 2024 19:42
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@jobsamuel
jobsamuel / install.sh
Last active April 21, 2020 06:53
Install MongoDB 3.0 in Ubuntu 14.04 LTS
#!/bin/bash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0
sudo service mongod start