Skip to content

Instantly share code, notes, and snippets.

View jaypal's full-sized avatar

jaypalsingh jaypal

  • MongoDB
  • Calgary, AB, Canada
View GitHub Profile
@jaypal
jaypal / ec2_info_retriever.py
Created December 9, 2018 04:37 — forked from dastergon/ec2_info_retriever.py
A basic boto3 based tool for retrieving information from running EC2 instances.
from collections import defaultdict
import boto3
"""
A tool for retrieving basic information from the running EC2 instances.
"""
# Connect to EC2
ec2 = boto3.resource('ec2')
@jaypal
jaypal / entrypoint.sh
Created December 21, 2017 17:19 — forked from gabber12/entrypoint.sh
Shell init for docker container with signal handling
# Uncomment to print commands being executed
# set -x
pid=0
# SIGTERM-handler
term_handler() {
echo "Handler INT";
if [ $pid -ne 0 ]; then
kill -SIGTERM "$pid"
wait "$pid"
@jaypal
jaypal / git-cheat-sheet.md
Created October 8, 2016 00:14 — forked from prograhammer/git-cheat-sheet.md
Git cheat sheet for some useful Git commands and command scenarios.
I reviewed some common Ruby methods and grouped them by behavior.
Hopefully this helps someone else too.
[Please copy paste and fix typos, add/delete, improve from this Gist.](https://gist.github.com/dirkdirk/9209d7ea67ac57543975162713910224)
-
# Array
@jaypal
jaypal / Sample Frame Navigation
Created June 1, 2015 16:43
Method to navigate through iframes with no name
public class AppsPage extends AbstractPageObject {
public AppsPage(WebDriver driver) {
super(driver);
switchFrames();
WaitTool.waitFor(driver, ExpectedConditions.visibilityOf(appTitle),
QBAConfigProperty.TIMEOUT_VALUE.getPropertyAsInt());
}