Skip to content

Instantly share code, notes, and snippets.

View vadirajks's full-sized avatar

Vadiraj K.S vadirajks

View GitHub Profile
curl -s -u admin:admin -XPOST "localhost:9000/api/organizations/enable_support" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/organizations/create?name=myorg&key=myorg" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/qualityprofiles/create?name=myprofile&language=java&organization=myorg" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/qualityprofiles/search" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/qualityprofiles/search?organization=myorg" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/qualityprofiles/search?defaults=true" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/projects/create?project=myproject&name=myproject" | python -m json.tool
curl -s -u admin:admin -XPOST "localhost:9000/api/qualityprofiles/search?project=myproject" | python -m json.tool
#delete
@vadirajks
vadirajks / aws.md
Created April 22, 2020 15:41 — forked from colinvh/aws.md
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@vadirajks
vadirajks / authentication-example.js
Created January 19, 2020 13:10 — forked from efimk-lu/authentication-example.js
Using Cognito in integration tests
const CognitoIdentityServiceProvider = require("amazon-cognito-identity-js");
// Required in order to use the cognito js library to work.
global.fetch = require("node-fetch");
/**
* Authenticate a cognito user and return its authentication token. Use the auth token in the authorization header
* @param callback Callback function with error as first param and the actual user token in the second param.
*/
function authenticateUser(callback) {
@vadirajks
vadirajks / Scripts.md
Created January 18, 2020 12:15 — forked from soruly/Scripts.md
Various scripts for demo

Various scripts for demo

parallel-ping.go

Ping a few IP address in parallel with Go routine

sanitize-filename.sh

Check malformed filenames and rename with _

post_to_facebook_group.sh

Post a message to facebook group in shell script using HTTPie and jq

@vadirajks
vadirajks / parallel-scp
Created November 8, 2019 04:52 — forked from andreipak/parallel-scp
Attempt to roll two useful pssh tools (parallel-ssh and parallel-scp) into reusable scripts with our old friend xargs. Link: http://90kts.com/2010/10/31/parallel-ssh-for-osx/
#!/bin/bash
usage()
{
cat << EOF
Usage: $0 [OPTIONS] -h hosts.txt local remote
-h hosts file (each line "host")
-r recusively copy directories (OPTIONAL)
-l username
-p max number of parallel threads (OPTIONAL)
@vadirajks
vadirajks / install.log
Created October 21, 2019 05:06 — forked from crmaxx/install.log
Installing and configuring P4Merge for Git on Ubuntu
# based on http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/
$ cd ~/Downloads
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz
$ tar zxvf p4v.tgz
$ sudo mkdir /opt/p4v
@vadirajks
vadirajks / postman-deb.sh
Created September 2, 2019 13:14 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
fi
echo "Downloading latest Postman tarball"
curlExists=$(command -v curl)
$ aws pricing describe-services \
  --region us-east-1 \
| jq -r '.Services[] | select (.ServiceCode=="AmazonEC2") | .AttributeNames[]' \
| sort
LeaseContractLength
OfferingClass
PurchaseOption
capacitystatus
clockSpeed
@vadirajks
vadirajks / sed cheatsheet
Created August 12, 2019 09:29 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@vadirajks
vadirajks / linux-cheatsheet.rtf
Created July 13, 2019 07:07 — forked from 101t/linux-cheatsheet.rtf
Comprehensive Linux Cheatsheet
```
____ _ _
/ ___|___ _ __ ___ _ __ _ __ ___| |__ ___ _ __ ___(_)_ _____
| | / _ \| '_ ` _ \| '_ \| '__/ _ \ '_ \ / _ \ '_ \/ __| \ \ / / _ \
| |__| (_) | | | | | | |_) | | | __/ | | | __/ | | \__ \ |\ V / __/
\____\___/|_| |_| |_| .__/|_| \___|_| |_|\___|_| |_|___/_| \_/ \___|
|_|
_ _ ____ _ _ _ _
| | (_)_ __ _ ___ __ / ___| |__ ___ __ _| |_ ___| |__ ___ ___| |_
| | | | '_ \| | | \ \/ / | | | '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __|