Skip to content

Instantly share code, notes, and snippets.

@nagpal
nagpal / swagger.json
Created October 6, 2017 13:21
Swagger definition for petstore
{
"swagger": "2.0",
"info": {
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"version": "1.0.1",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "[email protected]"
},
@nagpal
nagpal / aem-6.1-project
Last active August 29, 2015 14:24
Create a AEM 6.1 project from aem-project-archetype
mvn -B archetype:generate \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=10 \
-DgroupId=com.nagpal \
-DartifactId=test-lab \
-Dversion=0.0.1-SNAPSHOT \
-Dpackage=com.nagpal.testlab \
-DartifactName="Test Lab Artifact" \
-DcomponentGroupName="Test Lab Component Group" \
@nagpal
nagpal / sightly-cheat-sheet.md
Last active September 8, 2022 16:55
Sightly Cheat sheet
@nagpal
nagpal / gist:5037724
Created February 26, 2013 11:09
JSON to CSV - for importing in excel.
cat filename.json | sed -e 's/{/\n/g' | sed -e 's/}//g' | sed -e 's/\"//g' | awk 'BEGIN {FS=","} {for (i=1; i<=NF; i++) printf("%s,",substr($i,index($i,":")+1)); printf("\n"); }' | sed -e 's/[,]*$//g' > filename.csv