Skip to content

Instantly share code, notes, and snippets.

View msucil's full-sized avatar

Sushil Ale msucil

View GitHub Profile

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@msucil
msucil / gist:16a8f3f85d3915a9a2a942b4b251b7fa
Created August 13, 2018 05:41 — forked from siddharthg/gist:6923b2cbb402bd65255af7859a5d52a5
Install Thrift 0.10.0 with brew on macOS
brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16ebe5f1843e6cb54856311ff0f676be53007329/Formula/thrift.rb
ps -fC (command)java
kill -9 PID
#save output into local file
ps -fC java &> logifle
@msucil
msucil / delete-with-explain.sql
Created December 22, 2020 10:21
Postgres Delete Query Execution Plan to Identify Missing Indexes
BEGIN;
EXPLAIN (ANALYZE, BUFFERS, TIMING)
DELETE FROM table_name
ROLLBACK;
@msucil
msucil / postgres-idle-connection-kill-scirpt.sql
Last active December 30, 2020 09:01
Idele connection kill script for postgres
SELECT pg_terminate_backend( pid )
FROM pg_stat_activity WHERE datname='database_name' and state in ('idle') and state_change < CURRENT_TIMESTAMP - INTERVAL '10' minute
@msucil
msucil / docker-frequently-commands.md
Last active December 21, 2021 08:43
Frequently Used Docker Commands

Creates and run docker image in deamon mode defined in docker-compose file

docker-compose -f `docker-compose.yml` up -d

Enter into bash mode inside docker container

docker exec -it `docker image` /bin/bash

View logs in continous manner

docker logs `docker image` --tail=20 -f

Access to Container Terminal

@msucil
msucil / ngnix-minmal-configuration.md
Created February 16, 2021 10:48
Ngnix Minmal Configuration
server {
        server_name domain_name; #domain name eg: facebook.com
        
        #config request body size, usable for file upload
        client_max_body_size 2M

        location / {
                proxy_pass http://0.0.0.0:9091; # local_id:port
@msucil
msucil / gist:4697085d0c946907dfce764a31f7a768
Created May 10, 2021 12:43
HTML Email Client Testing Tool
https://htmlemail.io/send/
@msucil
msucil / daterange.sh
Created September 28, 2021 17:33
looping date between range
start=$1
end=$2
datevalue=0
start=$(date -d $start +%Y%m%d)
end=$(date -d $end +%Y%m%d)
while [ $start -le $end ]
do
echo $start