Skip to content

Instantly share code, notes, and snippets.

View saii9's full-sized avatar
😄
Currently learning skills other than coding, will be a while to my next checkin

Sai saii9

😄
Currently learning skills other than coding, will be a while to my next checkin
  • Wayfair LLC
  • Boston
View GitHub Profile

Keybase proof

I hereby claim:

  • I am saii9 on github.
  • I am saii9 (https://keybase.io/saii9) on keybase.
  • I have a public key ASB66oB5Z1PtfzYTN1glAqrG7aiBsWca5d5aQkLu5ng8dQo

To claim this, I am signing this object:

to find the root cert of the server
$] openssl s_client -showcerts -connect www.domain.com:443
downoad crt from http://cacerts.digicert.com/DigiCertGlobalCAG2.crt
convert to pem in home folder
$] openssl x509 -inform der -in DigiCertGlobalCAG2.crt -out DigiCertGlobalCAG2.pem
convert to crt
$] openssl x509 -outform der -in podcert.pem -out podcert.crt
@saii9
saii9 / vagrants.cmds
Last active April 27, 2018 14:32
Vagrant, Some help full commands
#get ip of vagrant machine
#all the commands are centered around my Vagrant git project
vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null
#get IP of host machine
netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10
@saii9
saii9 / bbb_rtl8723bu
Last active April 29, 2018 15:19
installation steps for rtl8723bu.sh on beaglebone
#To tether internet over USB (Ubuntu Only)
On Host machine
ifconfig
ifconfig enx544a16bf6b4e 192.168.7.1
sysctl net.ipv4.ip_forward=1
iptables --table nat --append POSTROUTING --out-interface wlp2s0 -j MASQUERADE
iptables --append FORWARD --in-interface nx544a16bf6b4e -j ACCEPT
On BeagleBone
route add default gw 192.168.7.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
@saii9
saii9 / uboot Commands
Created April 29, 2018 16:28
some Uboot commands for ref.
UBOOT prompt
------------
load mmc 1:2 0x88000000 /boot/am335x-boneblack.dtb # load dtb to memory
load mmc 1:2 0x82000000 /boot/uImage # load kernel to memory
# load: load a file to memory
# mmc: from MMC
# 1:2: 1 -> eMMC 2 -> partition 2
# 0x82000000: RAM addr to load into
# /boot/uImage: file name
@saii9
saii9 / Busybox-compilation.txt
Last active May 19, 2018 19:53
busybox compilation for self ref. Not to be run as a shell script
sudo apt-get install libncurses5-dev libncursesw5-dev unzip lzop u-boot-tools
#in a clean working directory donwload busybox
wget https://busybox.net/downloads/busybox-1.28.3.tar.bz2
tar xvjf busybox-1.28.3.tar.bz2
#downlaod linaro toolchain
wget https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
tar xvf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
#downlaod linux kernel source
@saii9
saii9 / systemd.txt
Last active July 8, 2018 21:38
Some usefull systemd commands
#to check SysV services
chkconfig --list | more
#To check systemd service files
systemctl list-unit-files
systemctl list-units
systemd
___________|___________
| | |
V2V Intersection Collision Warning (ICW) Dec 2016
• We built an v2v communication framework to add applications that are related to driver assistance and autonomous driving.
• Apps like automatic emergency braking, lane-following, automated lane changing can be added on this framework. We implemented Intersection collision warning system to demonstrate the working of the framework.
• Sensor fusion of compass and GPS module to eliminate any glitches in the positioning reported by GPS module.
• The ICW system which is demonstrated in the below YouTube link, is an important active safety feature in autonomous driving. It is driver assistance system which warns driver when there is a probability of collision.
• Can detect Intersection Collision Warning, predict collision time and warn the driver accordingly.
• Code repo at GitHub: https:/github.com/saii9/Vehicle-Comn-nrf
• YouTube Link: https://www.youtube.com/watch?v=roOfH7tUPEg
@saii9
saii9 / s3-v4-file-download.sh
Created November 13, 2018 20:22
download file from s3 using curl v4 authentication
#!/bin/bash
set -e
# set -x
function log(){
echo "$(date -u +'%Y%m%dT%H%M%SZ') - $*"
}
# variable declaration - start
bucket=<bucket>
@saii9
saii9 / node_spawn_delay_test.js
Created March 21, 2019 19:30
Node spawn delay test
const cluster = require('cluster');
if(cluster.isMaster){
function test(num){
let workers = {};
let count = num;
for (let i = 0; i < num; i++) {
workers[i] = [];
workers[i].push((new Date).getTime());
const worker = cluster.fork();