Skip to content

Instantly share code, notes, and snippets.

View pbashyal-nmdp's full-sized avatar
💭
I see graph...

Pradeep Bashyal pbashyal-nmdp

💭
I see graph...
View GitHub Profile
# Install Module::Starter if not already installed
# cpan -i Module::Starter
module-starter --distro=Foo-Bar-Baz \
--module=Foo::Bar,Foo::Baz \
--author="Pradeep Bashyal" [email protected] \
--eumm \
--ignores=git \
--license=lgpl3 \
--genlicense \
--minperl=5.32.1 \

LOAD CSV into Neo4j quickly and successfully

Since version 2.1 Neo4j provides out-of-the box support for CSV ingestion. The LOAD CSV command that was added to the Cypher Query language is a versatile and powerful ETL tool. It allows you to ingest CSV data from any URL into a friendly parameter stream for your simple or complex graph update operation, that …​ conversion.

@pbashyal-nmdp
pbashyal-nmdp / README.md
Created August 17, 2018 19:20 — forked from shortjared/README.md
If you have ever wanted to grab a marketplace AMI (ex: OpenVPN) you'll know that the process is painful. This solves the pain.

Usage

  • You will need to first make sure you have subscribed to the marketplace product
  • Get the AMI of the marketplace
  • Copy the script to machine
  • awsume (or otherwise authorize) to AWS
  • chmod the script to be executable if needed chmod +x marketplace-ami-encryptor.sh

Usage ./marketplace-ami-encryptor.sh {region} {ami} {name}
Example: ./marketplace-ami-encryptor.sh us-east-1 ami-f6eed4e0 OpenVPN

@pbashyal-nmdp
pbashyal-nmdp / useast1_s3_ips.py
Created June 1, 2018 16:58
Get CIDR of S3 service in us-east-1 region
#!/usr/bin/env python
# Usage:
# $ python ./useast1_s3_ips.py
# Update Date: 2018-06-01-12-26-19
#
# 52.92.16.0/20
# 52.216.0.0/15
# 54.231.0.0/17
#
@pbashyal-nmdp
pbashyal-nmdp / delete_old_slack_files.sh
Last active May 11, 2018 17:01
Delete old slack files
#!/bin/bash
# Delete old slack files that are older than 30 days
# Api Token
# Get token from https://api.slack.com/custom-integrations/legacy-tokens
TOKEN=${SLACK_TOKEN?:"No token Provided"}
# 30 Days ago (The -v option is BSD Unix/Mac Specific)
MONTH_BEFORE=`date -v-30d +%s`