Skip to content

Instantly share code, notes, and snippets.

View maisnamraju's full-sized avatar

Maisnam Raju Singh maisnamraju

View GitHub Profile
@maisnamraju
maisnamraju / client.js
Last active February 25, 2020 10:03 — forked from agrueneberg/client.html
HMAC-SHA256 sample code.
var http, crypto, sharedSecret, query, signature;
http = require("http");
crypto = require("crypto");
sharedSecret = "super-secret";
body = { "test": "123" };
signature = crypto.createHmac("sha256", sharedSecret).update(body).digest("hex");
http.post({
<p dir="ltr" style="line-height:1.2;text-align: center;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:#000000;background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">PAAYS FINANCIAL TECHNOLOGIES INC.</span></p>
<p dir="ltr" style="line-height:1.2;text-align: center;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:#000000;background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">TERMS OF USE</span></p>
<p>
<br>
</p>
<p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:9pt;font-family:Calibri,sans-serif;color:#000
curl 'https://identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key=[API_KEY]' \
-H 'Content-Type: application/json' \
--data-binary '{"postBody":"id_token=[GOOGLE_ID_TOKEN]&providerId=[google.com]","requestUri":"[http://localhost]","returnIdpCredential":true,"returnSecureToken":true}'
@maisnamraju
maisnamraju / create-ssl-for-localhost
Last active September 24, 2019 04:44 — forked from itsMattShull/create-ssl-for-localhost
Command to create a key.pem and cert.pem for localhost for ubuntu
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout key.pem \
-new \
-out cert.pem \
-subj /CN=localhost \
-reqexts SAN \
-extensions SAN \
@maisnamraju
maisnamraju / main.go
Created June 27, 2019 10:53 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@maisnamraju
maisnamraju / go-soap-wsdl-using-http.go
Created June 17, 2019 07:53 — forked from novalagung/go-soap-wsdl-using-http.go
Example implementation of making SOAP call on WSDL web service using go with only net/http package. The full tutorial avaiable on https://medium.com/eaciit-engineering/soap-wsdl-request-in-go-language-3861cfb5949e
package main
import (
"bytes"
"crypto/tls"
"encoding/base64"
"encoding/xml"
"fmt"
"log"
"net/http"
CardHolderDetails:
{ AddressLine1: '181 University Ave',
AddressLine2: 'Suite 1802',
BirthDate: '/Date(1972-12-31)/',
BusinessPhone: '',
CardHolderID: '',
City: 'Toronto',
Company: '',
CountryCode: 'CA',
CountrySubdivisionCode: 'ON',
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f70c6d8aba3, pid=256, tid=0x00007f70c8087700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x907ba3] SR_handler(int, siginfo*, ucontext*)+0x33
#
@maisnamraju
maisnamraju / data.json
Created November 4, 2018 05:27
grib data
This file has been truncated, but you can view the full file.
[{"header":{"discipline":0,"disciplineName":"Meteorological products","gribEdition":2,"gribLength":48369,"center":7,"centerName":"US National Weather Service - NCEP(WMC)","subcenter":0,"refTime":"2018-11-04T00:00:00.000Z","significanceOfRT":1,"significanceOfRTName":"Start of forecast","productStatus":0,"productStatusName":"Operational products","productType":1,"productTypeName":"Forecast products","productDefinitionTemplate":0,"productDefinitionTemplateName":"Analysis/forecast at horizontal level/layer at a point in time","parameterCategory":0,"parameterCategoryName":"Temperature","parameterNumber":0,"parameterNumberName":"Temperature","parameterUnit":"K","genProcessType":2,"genProcessTypeName":"Forecast","forecastTime":0,"surface1Type":1,"surface1TypeName":"Ground or water surface","surface1Value":0.0,"surface2Type":255,"surface2TypeName":"Missing","surface2Value":0.0,"gridDefinitionTemplate":0,"gridDefinitionTemplateName":"Latitude_Longitude","numberPoints":65160,"shape":6,"shapeName":"Earth spherical with
{
"_id" : ObjectId("5af99f1f5b51a81520f620fa"),
"City" : "Jakarta",
"Name" : "Kisaku Japanese Restaurant",
"Street" : "",
"Street_Number" : "",
"Postal" : NumberInt(13960),
"Locality" : "",
"Country" : "Indonesia",
"Formatted_Address" : "Ujung Menteng; Cakung; East Jakarta City; Jakarta 13960; Indonesia",