Skip to content

Instantly share code, notes, and snippets.

View gowthamgts's full-sized avatar
💭
It's not much, but it's honest work.

Gowtham gowthamgts

💭
It's not much, but it's honest work.
View GitHub Profile
@gowthamgts
gowthamgts / make_output_id3lib
Created July 20, 2014 15:18
Make Output of id3lib
make all-recursive
make[1]: Entering directory `/home/gts/downloads/id3lib-3.8.3'
Making all in .
make[2]: Entering directory `/home/gts/downloads/id3lib-3.8.3'
make[2]: Leaving directory `/home/gts/downloads/id3lib-3.8.3'
Making all in m4
make[2]: Entering directory `/home/gts/downloads/id3lib-3.8.3/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/gts/downloads/id3lib-3.8.3/m4'
Making all in zlib
{
"Comment": "An example of the Amazon States Language using a choice state.",
"StartAt": "ChoiceState",
"States": {
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.foo",
"NumericEquals": 1,
@gowthamgts
gowthamgts / squid.conf
Created April 24, 2017 14:46 — forked from hpcorona/squid.conf
simple squid3 configuration to allow all to connect to all
#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
@gowthamgts
gowthamgts / List of AWS Services.md
Last active September 17, 2017 09:20
List of AWS Services

Compute:

  • Amazon Elastic Compute Cloud (EC2)
  • Amazon Elastic Beanstalk
  • Amazon Lambda (AWS Lambda)

Networking:

  • Amazon Route 53
  • Amazon Virtual Private Cloud (VPC)
  • AWS Direct Connect
  • Amazon Elastic Load Balancing (ELB)
@gowthamgts
gowthamgts / 0. nginx_setup.sh
Created February 18, 2018 13:50 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz
@gowthamgts
gowthamgts / DrawableExtension.kt
Created October 14, 2018 07:59
A kotlin extension to convert a Drawable object to Bitmap
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
fun Drawable.toBitmap(): Bitmap {
if (this is BitmapDrawable) {
return this.bitmap
}
@gowthamgts
gowthamgts / shell.sh
Created March 26, 2019 10:04
Confirm a user in cognito
# initiate and get session token
aws cognito-idp admin-initiate-auth --user-pool-id <pool_id> --client-id <client_id> --auth-flow ADMIN_NO_SRP_AUTH\
--auth-parameters USERNAME=<username>,PASSWORD=<pw>
# update with new password
aws cognito-idp admin-respond-to-auth-challenge --user-pool-id <pool_id> \
--client-id <client_id> --challenge-name NEW_PASSWORD_REQUIRED \
--challenge-responses NEW_PASSWORD=<new_password>,USERNAME=<username>,userAttributes.name="<if there are any>"\
--session "<session_key>"
@gowthamgts
gowthamgts / rm_mysql.md
Created April 12, 2019 08:17 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@gowthamgts
gowthamgts / docker-compose.yml
Last active April 16, 2019 07:28
Elastic search with kibana docker-compose.yml
version: "2.0"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.0.1
ports:
- "9200:9200"
- "9300:9300"
networks:
- docker_elk
environment:
@gowthamgts
gowthamgts / docker-compose.yml
Created May 13, 2019 18:12
Elastic Search 6 Docker Compose
version: "2.0"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.0.1
ports:
- "9200:9200"
- "9300:9300"
networks:
- docker_elk
environment: