Skip to content

Instantly share code, notes, and snippets.

View venkyvb's full-sized avatar

Venki Balakrishnan venkyvb

View GitHub Profile
@venkyvb
venkyvb / README.md
Created August 13, 2018 16:38 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@venkyvb
venkyvb / angular.md
Created August 9, 2018 02:14 — forked from sinedied/angular.md
The Missing Introduction to Angular 2 and Modern Design Patterns

Introduction to Angular

Angular (aka Angular 2) is a new framework completely rewritten from the ground up, replacing the famous AngularJS framework (aka Angular 1.x).

More that just a framework, Angular should now be considered as a whole platform which comes with a complete set of tools, like its own CLI, debug utilities or performance tools.

Getting started

package com.example.jersey;
import javax.net.ssl.*;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Configuration;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
@venkyvb
venkyvb / nbody.py
Created January 2, 2018 18:04
n-body simulation (Astrophysics)
from visual import *
from time import clock
from random import random,uniform
import numpy
import math
# Sets up a bunch of masses and lets them move under the influence of their
# mutual gravity.
# Masses are put in random positions within a sphere originally. An additional
# force is applied which simulates an equal density distributed over the
@venkyvb
venkyvb / odp_integration.md
Created December 8, 2017 04:09
Using SAP Hybris Cloud for Customer Operational Data Provisioning API (payload samples)

Operational Data Provisioning (ODP) payload examples

This document outlines some example payloads for using ODP (Operational Data Provisioning) API to pull data from SAP Hybris Cloud for customer (SAP Hybris C4C) system to non-BW systems. For integration with SAP NetWeaver Business Warehouse systems refer to the help documentation.

Configuring your tenant to enable ODP

Please refer to the help documentation that outlines the steps needed to set-up ODP in your SAP Hybris C4C tenant.

Operational Call Sequence

GetList -> GetDetails -> FetchDataDirect

@venkyvb
venkyvb / index.js
Created June 26, 2017 06:20 — forked from JonathanMH/index.js
JSON Web Token Tutorial: Express
// file: index.js
var _ = require("lodash");
var express = require("express");
var bodyParser = require("body-parser");
var jwt = require('jsonwebtoken');
var passport = require("passport");
var passportJWT = require("passport-jwt");

Keybase proof

I hereby claim:

  • I am venkyvb on github.
  • I am venkyvb (https://keybase.io/venkyvb) on keybase.
  • I have a public key whose fingerprint is 33D8 289D 6137 9195 5941 1937 C7F8 EA0B 4DF9 B40B

To claim this, I am signing this object:

@venkyvb
venkyvb / samplerest.js
Created November 7, 2016 07:11 — forked from joshbirk/samplerest.js
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
@venkyvb
venkyvb / SOAPTest.java
Created December 13, 2015 01:08
SAP Cloud for customer CustomerQueryByElements Sample
package main.java.venkyvb.soap;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@venkyvb
venkyvb / ODataReadMetadata.py
Created November 1, 2015 02:21
Python OData Read Metadata
import urllib2, base64
username = "user_name_here"
password = "password_here"
request = urllib2.Request("https://myNNNNNN.crm.ondemand.com/sap/c4c/odata/v1/c4codata/$metadata")
base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
request.add_header("Authorization", "Basic %s" % base64string)
result = urllib2.urlopen(request)
content = result.read()