This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://xsltfiddle.liberty-development.net/jyH9rLX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 2 -type d -exec rename 's/\/([1-9]\.)/\/0$1/g' {}/ \; | |
# it prepends zero in folder names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mkv -filter_complex "[0:v]setpts=<1/x>*PTS[v];[0:a]atempo=<x>[a]" -map "[v]" -map "[a]" output.mkv | |
eg. | |
ffmpeg -i input.mkv -filter_complex "[0:v]setpts=1/2*PTS[v];[0:a]atempo=2[a]" -map "[v]" -map "[a]" output.mkv | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jira jql epictask -j 1 | jq '.[] | "\(.key),\(.fields.summary),\(.fields.created),\(.fields.updated)"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/69973010/how-do-i-avoid-creating-a-cross-product-when-extracting-multiple-sub-elements-fr | |
cat /tmp/jira.txt | jq '.[] | {key} + (.changelog.histories[] | {created} + (.items[] | {field,fromString,toString})) | select (.field=="status")' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{pincode:1,value:1},{pincode:2,value:2}] | |
to | |
{1:{pincode:1,value:1},2:{pincode:2,value:2}} | |
jq '.| map({(.pincode|tostring): .}) | add' IN.json > pincode_wise.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#identify is part of imagemagick suite | |
echo "@startmindmap" > /tmp/.org2file.uml | |
cat $1 >> /tmp/.org2file.uml | |
echo "@endmindmap" >> /tmp/.org2file.uml | |
#if -DPLANTUML_LIMIT_SIZE=18192 is not provided then image gets cropped off | |
java -jar /home/palashkulshreshtha/bin/plantuml.jar -DPLANTUML_LIMIT_SIZE=18192 -o /tmp/ /tmp/.org2file.uml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 describe-snapshots --filters Name=tag:Techteam,Values=mall-cart | jq '.Snapshots[] | "\(.SnapshotId),\(.VolumeId),\(.StartTime),\(.VolumeSize),\(.Tags[] | select(.Key=="Hostname") | .Value),\(.Description)"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xlsxwriter | |
from functools import reduce | |
# Create an new Excel file and add a worksheet. | |
workbook = xlsxwriter.Workbook('merge1.xlsx') | |
worksheet = workbook.add_worksheet() | |
# Create a format to use in the merged range. | |
merge_format = workbook.add_format({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to find last value of the column | |
K1 is start of upper header, U6 is end of current row | |
we want to find header of last non empty column in a row (for K to U columns) | |
=ifna(index(filter($K$1:U6,not(ISBLANK(K6:U6))),1,counta(K6:U6)),"TBD") | |
This selects subset of non empty cells from K1 to U6 (from first row to current row) | |
FILTER AREA | |
=filter($K$1:U6,not(ISBLANK(K6:U6))) |