Skip to content

Instantly share code, notes, and snippets.

View harinduravin's full-sized avatar
👾
Working from home

Harindu Ravin Jayarathne harinduravin

👾
Working from home
View GitHub Profile
@harinduravin
harinduravin / rtp.sdp
Created August 19, 2021 04:26
SDP file that includes important information for the receiver
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.1.3
t=0 0
a=tool:libavformat 58.29.100
m=video 1234 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
@harinduravin
harinduravin / streamer2.py
Created August 19, 2021 04:16
The ROS node created by implemeting the FFmpeg library
#!/usr/bin/env python3
"""
Created on Aug 13 2021
"""
import os
import numpy as np
import cv2
import time
@harinduravin
harinduravin / player.html
Created August 18, 2021 19:42
html file for loading the web page for flask server
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>References</title>
<style type="text/css">
@import url("{{ url_for('static', filename='styles.css')}}");
</style>
</head>
<body>
@harinduravin
harinduravin / streamer.py
Created August 18, 2021 19:04
Streamer ROS node to implement a flask server to initiate video streaming
#!/usr/bin/env python3
"""
Created on Aug 13 2021
"""
import os
import numpy as np
import cv2
import time
import rospy
@harinduravin
harinduravin / access_token_test.js
Created January 19, 2021 08:54
Test script for Access token
var jsonData = JSON.parse(responseBody);
if (jsonData.access_token !== null) {
postman.setEnvironmentVariable("Access_Token", jsonData.access_token);
}
@harinduravin
harinduravin / Access_token_pre.js
Created January 19, 2021 08:53
Pre request script for access token
// Sketchy loading of the jsrsasign library into Postman Sandbox
var navigator = {}; //fake a navigator object for the lib
var window = {}; //fake a window object for the lib
eval(pm.globals.get("jsrsasign-js")); //import javascript jsrsasign
var currentTime = +new Date(); // the current time in milliseconds
var issuedAtTimeSeconds = currentTime/1000;
var expirationTimeSeconds = currentTime/1000 + 7200;
@harinduravin
harinduravin / post_test.js
Created January 19, 2021 08:42
Javascript code for test
var jsonData = JSON.parse(responseBody);
if (jsonData.client_id !== null) {
postman.setEnvironmentVariable("Client_ID", jsonData.client_id);
}
@harinduravin
harinduravin / post-Prerequest.js
Created January 19, 2021 08:32
Pre request script for the Post request
// Sketchy loading of the jsrsasign library into Postman Sandbox
var navigator = {}; //fake a navigator object for the lib
var window = {}; //fake a window object for the lib
eval(pm.globals.get("jsrsasign-js")); //import javascript jsrsasign
var currentTime = +new Date(); // the current time in milliseconds
var issuedAtTimeSeconds = currentTime/1000;
var expirationTimeSeconds = currentTime/1000 + 2592000;
@harinduravin
harinduravin / jsr.js
Created January 19, 2021 07:30
A javascript that Signs JWTs
/*
* jsrsasign(all) 10.1.5 (2021-01-17) (c) 2010-2020 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
@harinduravin
harinduravin / private_key.txt
Created January 19, 2021 07:27
A working private key
-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC3lU0vdr8EPFVB Zximw1xK5/O48iC+NPcrvQ/oigtnGsnxKqQIX+a9k3t8cxp73kAFVWecPE7w/nTp PQsdalET0ShE7dnyf9oqruiC3bJCabr+RdjjkSAKEt9ONUAiFoHW5Pnp16vktZiQ pBYmU8XO/tnt8Z05G0YZFWGmP90g1Q8WtK0vYkgQeu/rAYFKKiRo4RS98OMkijKK 0MnICvB1rvuYCvi2WjGpCWu7yvkwzWjJKK6H5aWHb75TNrNYjDsny+PeP0PZj39j N5yrlUXjsis8BiKGRLrW2e857ZSK2Zr/cxil79RNND2F7ah5HRsFPbnLBydNo1GV e2gfWg/dAgMBAAECggEAKBDWkphI4gTE2oxEjgiu+M4cm+2EBd8LXqlZcnfGO09W aWLT/9vmQNOSLLv2OLhtonxcK3XiCKiQHWMsLNRKM5f/QOPkIA+VLqGTrxPxVps6 q0nVJv1CT9CEmc33XDkrRxocDNP7+ONFE7Qr/VtlHWLzbwG/PXpdVxYahK0FdqeK i85/5uKN1fDttK6vrQ7aWSTd2zRBTmC6s8QPXpJEZ1eCqC8xxWvFAD7iyptdkSFt DSc1uYR7llyFKB9/xqSPNBS6aSH/4ac1nGwoecpMkUXXdLSdJtxsCjjNbj9cSHLz Q6KU2K/O4SFbeQZoIHRQwJ8d0NTufaEjfuISavbmBQKBgQDbwdffKps9AwC03wB+ bkRPYrjAuMJKLcjnSMcv2CZG/oCh3tj8p3QNB6y1x4VZhkP0s2EJaqaSS32xHzBh WtFLUVWXAlMiCs6NnTpz3ypPNLg+C0oyYJnHn8GgdmYp4aEiQ+VppqRN5q0UMAYZ ZABJcM6LqDOAYgIojJRADBp4DwKBgQDV3DDqDviuJsEPiwDqTplKolWqKehNNO7q WPOepqRMy4Buq4F0PAv9k