Skip to content

Instantly share code, notes, and snippets.

View manojkarthick's full-sized avatar
powered by caffeine

Manoj Karthick manojkarthick

powered by caffeine
View GitHub Profile
@manojkarthick
manojkarthick / create_compute_environment_and_job_queue.py
Created July 10, 2021 19:46 — forked from DaisukeMiyamoto/create_compute_environment_and_job_queue.py
Create compute environment and job queue for AWS Batch with Boto3 (Polling and Waiter implementations)
####################################################################
# Create compute environment and job queue for AWS Batch with Boto3
# Daisuke Miyamoto
# 20200330
#
import boto3
import botocore.waiter
from botocore.exceptions import WaiterError
import time
!tables - list all tables
!describe {table name} - detailed description of the table
DROP TABLE IF EXISTS my_table; - drops the table named my_table
SELECT * FROM my_table LIMIT 1000; - selects all columns from my_table limiting the result set to 1000 records
DELETE FROM my_table WHERE ID= 321; - deletes a record from my_table where the primary Id is equal to 321
CREATE INDEX idx_last_updated_date ON sales.opportunity(last_updated_date DESC) - Creates a secondary index on a table or view. The index is kept in sync with the table as data changes. At query time, the optimizer will use the index if it contains all columns referenced in the query to produce an efficient execution plan.
!quit - quites SQLLine client
@manojkarthick
manojkarthick / athena_cheatsheet.md
Created January 21, 2019 19:09 — forked from steveodom/athena_cheatsheet.md
AWS Athena / Hive / Presto Cheatsheet

Useful Links / Sources

Housekeeping

change column type

ALTER TABLE logs.trades CHANGE recentprice price int;
@manojkarthick
manojkarthick / whatsapp_phone_enumerator_floated_div.js
Created May 12, 2017 10:22
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every