Skip to content

Instantly share code, notes, and snippets.

View palashkulsh's full-sized avatar
🍓
delusion of reprieve

palash kulshreshtha palashkulsh

🍓
delusion of reprieve
View GitHub Profile
@palashkulsh
palashkulsh / auto scaling group filtering
Created April 6, 2020 15:31
filtering auto scaling group on the basis of tags
sudo aws autoscaling describe-auto-scaling-groups --region=ap-south-1 --query 'AutoScalingGroups[] | [?contains(Tags[?Key==`Techteam`].Value, `mall-cart`)]' | jq '.[] | "\(.AutoScalingGroupName),\(.TerminationPolicies[])"'
@palashkulsh
palashkulsh / ffmpeg
Created March 30, 2020 04:54
convert video audio format using ffmpeg
ffmpeg -i Good.Newwz.2019.Hindi.720p.HDRip.x264.mkv -acodec aac -filter_complex "channelmap=map=FL-FL|FR-FR|FC-FC|LFE-LFE|SL-BL|SR-BR:channel_layout=5.1" -vcodec copy new_Goodnews.mp4
@palashkulsh
palashkulsh / documenting json objects
Created January 24, 2020 11:56
documenting json object
function recurse(o ){
let keys=[];
debugger
if(typeof(o)=="number"){
keys.push('(number)');
} else if (typeof(o)=="string"){
try{
JSON.parse(o);
keys.push('(jsonstring)');
} catch(e){
@palashkulsh
palashkulsh / eslint_setup
Created January 21, 2020 08:44
eslint setup on emacs and linux
npm install eslint --save-dev --global
npm install eslint_d --save-dev --global
install flycheck in emacs
install js2-mode in emacs
install eslintd
@palashkulsh
palashkulsh / custom_telnet.sh
Created September 11, 2019 07:37
custom telnet script for db connection in python
import sys
import socket
s=0
try:
s=socket.create_connection((sys.argv[1],3306),timeout=(1))
except:
s=0
if s:
print("{},yes".format(sys.argv[1]))
else:
@palashkulsh
palashkulsh / prepare-commit-msg
Created September 9, 2019 07:38
.git/hooks/prepare-commit-msg putting branch name in every commit message to avoid manually typing . ch
#!/bin/sh
#chmod +x prepare-commit-msg
BRANCH=`git branch | grep '^\*' | cut -b3-`
FILE=`cat "$1"`
echo "$BRANCH $FILE" > "$1"
@palashkulsh
palashkulsh / jira_jql_csv.sh
Last active August 13, 2019 08:13
make jira jql in csv
jira jql 1300 -j 1 | jq '.[]| "\(.key),\(.fields.summary),\(.fields.status.name)"' | sed 's/"//' | csvlook -H
@palashkulsh
palashkulsh / grafana_PCRE_expression
Created July 31, 2019 09:55
grafana elb filtering pcre expression
/.*loadbalancer\/(?:app\/)?([a-zA-Z0-9-]*)\/?(?:.*)?/
@palashkulsh
palashkulsh / resume.json
Created June 27, 2019 19:13 — forked from thomasdavis/resume.json
{ "theme": "elegant"}
{
"basics": {
"name": "Thomas Davis",
"label": "Web Developer",
"summary": "I’m a full stack web developer who loves working with open source technology. I work best at planning the architecture of web applications and their development life cycles. I also love to get the community involved and have had much experience with building and organizing large open source groups. Specialties: React, Redux, Javascript - Full stack developer with lots of experience in lots of stuff.",
"website": "https://ajaxdavis.com",
"email": "[email protected]",
"location": {
"city": "Melbourne",
"countryCode": "AU"
@palashkulsh
palashkulsh / plantuml_sprite_from_image
Created June 17, 2019 06:12
resize and make plantuml sprite from image to be used in plantuml diagram
#resize the image to desired size
convert /tmp/consul.png -resize 64x64 /tmp/consul_64.png
# make sprite for plantuml
plantuml -encodesprite 8 /tmp/consul_64.png
sprite $consul [45x64/8] {
0000000000000234CKSaaaaaSSKC32000000000000000
00000000014KaaaaaaaaaaaaaaaaaaaK4200000000000
00000003SaaaaaaZXWOOGGGGOWXYZaaaaaH0000000000